Lua.VM.AssertionError exception (Lua v1.0.0-rc.1)

View Source

Raised by the Lua assert() function when the condition is falsy.

When raised without explicit :line / :source opts, exception/1 populates them from the calling Lua source position via Lua.VM.Executor.current_position/0.

Summary

Functions

Returns a wire-safe structured map for this error. See Lua.VM.ErrorFormatter.to_map/3 for the shape.

Types

t()

@type t() :: %Lua.VM.AssertionError{
  __exception__: true,
  call_stack: term(),
  line: term(),
  message: term(),
  source: term(),
  value: term()
}

Functions

to_map(error, opts \\ [])

@spec to_map(
  t(),
  keyword()
) :: map()

Returns a wire-safe structured map for this error. See Lua.VM.ErrorFormatter.to_map/3 for the shape.

Pass :source_code to populate source_context.