Expand description
Parsing errors
§Error philosophy
We don’t spend a huge amount of effort producing precise and informative errors.
We report:
-
A line number in the document where the error occurred. For a problem with an item keyword line, that line is reported. For an Object, a line somewhere in or just after the object is reported.
-
The column number of an invalid or unexpected item argument.
-
The expected keyword of a missing item.
-
The struct field name of a missing or invalid argument.
-
The file name (might be a nominal file name)
-
What kind of document we were trying to parse.
We do not report:
-
Byte offsets.
-
Any more details of the error for syntactically invalid arguments, bad base64 or bad binary data, etc. (eg we discard the
FromStr::Err)
This saves a good deal of work.
Macros§
- derive_
deftly_ 🔒template_ Error Problem - Bespoke derives for
ErrorProblem
Structs§
- Parse
Error - Error encountered when parsing a document, including its location
- Unexpected
Argument - An unexpected argument was encountered
Enums§
- Argument
Error - Problem found when parsing an individual argument in a netdoc keyword item
- Error
Problem - Problem found when parsing a document
- Verify
Failed - Error from signature verification (and timeliness check)