errorΒΆ
type error
An error. Values of this type are not accessible from Minilang code since they are caught by the runtime. Each error contains an error value which contains the details of the error.
fun error(Type: string, Message: string): error
Creates an error exception with type
Type
and messageMessage
. Since this creates an exception, it will trigger the current exception handler.type error::value
An error value. Error values contain the details of an error but are not themselves errors (since errors are caught by the runtime).
meth (Error: error::value):message: string
Returns the message of
Error
.meth (Error: error::value):raise: error
Returns
Error
as an error (i.e. rethrows the error).meth (Error: error::value):trace: list
Returns the stack trace of
Error
as a list of tuples.meth (Error: error::value):type: string
Returns the type of
Error
.fun raise(Type: string, Value: any): error
Creates a general exception with type
Type
and valueValue
. Since this creates an exception, it will trigger the current exception handler.