Skip to main content

Module error

Module error 

Source
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_ErrorProblem 🔒
Bespoke derives for ErrorProblem

Structs§

ParseError
Error encountered when parsing a document, including its location
UnexpectedArgument
An unexpected argument was encountered

Enums§

ArgumentError
Problem found when parsing an individual argument in a netdoc keyword item
ErrorProblem
Problem found when parsing a document
VerifyFailed
Error from signature verification (and timeliness check)