View Source Matcha.Error behaviour (Matcha v0.1.10)

Standard behaviour for Matcha errors.

Link to this section Summary

Callbacks

Generates the "prelude" text for errors in the struct this error handles into a string displayable in an error message.

Converts the struct this error handles into a string displayable in an error message.

Link to this section Types

@type error_problem() :: {:error, message()}
@type message() :: binary() | charlist()
@type problem() :: error_problem() | warning_problem()
@type problems() :: [problem()]
@type warning_problem() :: {:warning, message()}

Link to this section Callbacks

@callback format_prelude(struct()) :: binary()

Generates the "prelude" text for errors in the struct this error handles into a string displayable in an error message.

@callback format_source(struct()) :: binary()

Converts the struct this error handles into a string displayable in an error message.

Link to this section Functions