Errors defines a format for describing human readable error messages, that can also quote some source, in order to identify the source of an error.
Defines the content of an error message.
The body is written in mdgriffith/elm-markup and looks like this:
There was an error in your code.
|> Source
label = Look, here it is:
pos = 0
Please fix it. This is not a helpful error message.An ErrorMessage will be combined with some lines of source code that it can
quote, in order to produce an Error.
Defines the signature of a function for building Errors. This keeps the positional information variable, but requires a function to turn source code positions into quotes lines of source code.
Typically implementation of this will use the lookupError functions and an
error catalogue of error messages.
Looks up an ErrorMessage in an error catalogue and fills in its quoted source code and parameters to produce an Error.
Looks up an ErrorMessage in an error catalogue and fills in its quoted source code to produce an Error.
elm-markup Document describing the format of an error.
Renders an Error as a String for printing to the console with ANSI colours.
Renders an Error as HTML.
Common Error definition, for reporting errors to users.
This contains all the information needed to build a nice human readable error message. The body is written in
mdgriffith/elm-markupand looks like this: