InvariantViolationException Type
Raised when Fantomas reaches a state that its own model says is impossible, for example a chain whose parts do not fit the shape the transformer guarantees. Unlike the other exceptions here, this never indicates a problem with the code being formatted: it is a bug in Fantomas, or a change in how the F# parser groups expressions. Failing loudly is deliberate — the alternative is silently dropping parts of the source.
Constructors
| Constructor |
Description
|
Full Usage:
InvariantViolationException(msg, range)
Parameters:
string
range : range
Returns: InvariantViolationException
|
|
Full Usage:
InvariantViolationException(msg, range, syntaxNode)
Parameters:
string
range : range
syntaxNode : string
Returns: InvariantViolationException
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.Invariant
Returns: string
|
The invariant that was violated, on one line, without the location or the "please report" suffix. A caller that positions the violation against the source itself reports this and draws the rest from `Range`.
|
|
The source range of the construct that triggered the violation.
|
Full Usage:
this.SyntaxNode
Returns: string
|
The syntax tree node that triggered the violation, dumped in full, or an empty string when there is none to show. This is what a maintainer triaging the issue needs and what whoever filed it does not, so it is kept off the message and reported at detailed verbosity.
|
fantomas