Skip to content

Commit

Permalink
feat: revamped error messages
Browse files Browse the repository at this point in the history
The error messages now show:

filename:line:column: message

The character being processed is no longer shown. The language was also cleaned
up to avoid talking about "validity" since we don't validate XML against a
schema and some messages have been made clearer.
  • Loading branch information
lddubeau committed Jul 6, 2018
1 parent 9a20cad commit cf9c589
Show file tree
Hide file tree
Showing 18 changed files with 113 additions and 110 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,19 @@ fs.createReadStream("file.xml")

Pass the following arguments to the parser function. All are optional.

`opt` - Object bag of settings regarding string formatting. All default to `false`.
`opt` - Object bag of settings regarding string formatting.

Settings supported:

* `xmlns` - Boolean. If true, then namespaces are supported.
* `position` - Boolean. If false, then don't track line/col/position.
* `xmlns` - Boolean. If true, then namespaces are supported. Default
is `false`.

* `position` - Boolean. If false, then don't track
line/col/position. Unset is treated as `true`. Default is unset.x

* `fileName` - String. Set a file name for error reporting. This is
useful only when tracking positions. You may leave it unset, in
which case the file name in error messages will be `undefined`.

## Methods

Expand Down
Loading

0 comments on commit cf9c589

Please sign in to comment.