Skip to main content

Module diagnostic

Module diagnostic 

Source
Expand description

Findings about data, accumulated and returned alongside success.

A reader hands back the structure and the list of everything wrong with it. Stopping at the first problem makes real archive files unusable, and throwing warnings away on success makes their problems invisible — which is worse, because the caller then has a plausible result and no reason to doubt it.

Findings are ordered before they are returned: worst first, then by position in the file, then by code. Two runs over the same input therefore produce the same list in the same order, which is what makes a result hashable and a regression test meaningful.

Structs§

Code
A stable diagnostic code, rendered as MOLFRAME-E1103 or MOLFRAME-W3011.
ContextItem
A named piece of supporting detail attached to a finding.
Diagnostic
One finding about the data.
Diagnostics
A growing list of findings that keeps itself in reproducible order.
Findings
The findings an operation produced, as a finished set.
Rendered
A finding prepared for display.

Enums§

Class
The class of problem a code’s leading digit names.
Kind
Whether a code denotes a failure or an observation.
Severity
How bad a finding is, independent of how the caller wants to react.
Strictness
How much irregularity the caller is willing to accept.