Numscript.Error exception (numscript v0.2.0)

Copy Markdown View Source

A parse, execution or runtime error.

kind is the error's name in the interpreter ("MissingFundsErr", "ParserError", "MissingVariableErr", ...) or "Runtime"/"Timeout". start/end are {line, column}, counting from 1, when the error points at a piece of the script. details has the error's fields (for example "needed", "available" and "asset" for missing funds).

Summary

Types

t()

@type t() :: %Numscript.Error{
  __exception__: true,
  details: map(),
  end: {pos_integer(), pos_integer()} | nil,
  errors: [t()],
  kind: String.t(),
  message: String.t(),
  start: {pos_integer(), pos_integer()} | nil
}

Functions

missing_funds?(error)

Is it a lack of funds?

new(kind, message)