class Error
Language error and traceback.
index
members
-
error\add_frame(where)
– append a traceback frame.
static functions
-
Error\new(kind, message, detail)
– create a new Error. -
Error.wrap(frame, fn)
– Wrap function errors in a traceback frame. -
Error.try(frame, fn)
– Capture and wrap function errors in traceback frame.
details
members
-
– append a traceback frame.
where should denote where the Error occured and fit grammatically to complete the sentence "{error} occured while {where}"
parameters:
static functions
-
– create a new Error.
kind should be one of:
- 'reference': error concerning symbol resolution
- 'argument': error concerning Op argument matching
- 'implementation': error in the Lua/MoonScript implementation of alive. Should not occur in normal operation, and constitutes a bug.
parameters:
-
– Wrap function errors in a traceback frame.
Execute fn(...), and turn any error thrown as a result into an Error instance, before re-throwing it.
When Error instances are caught, frame is added to the traceback. All other error values are turned into 'implementation' Errors.
parameters:
-
– Capture and wrap function errors in traceback frame.
Execute fn(...), and turn any error thrown as a result into an Error instance, before re-throwing it.
When Error instances are caught, frame is added to the traceback. All other error values are turned into 'implementation' Errors.
parameters:
returns:
- (boolean): ok true if exeuction suceeded without errors
- (Error or any): error_or_results the Error instance or results