Schooner.Location (schooner v1.2.0)

Copy Markdown View Source

A position in Scheme source: the file it came from, if known, and the 1-based line and column of the first character of the form.

Every script-level exception carries a :location field holding one of these, or nil when no position is known. When the location names a file, the exception's message is prefixed with file:line:col:. Pass :file to Schooner.eval/3 or Schooner.compile/3 to supply it. Use Schooner.format_error/2 to render an error for people.

Summary

Types

t()

@type t() :: %Schooner.Location{
  column: pos_integer(),
  file: binary() | nil,
  line: pos_integer()
}