Exception type

Represents exceptional situaution. All thrown things shouhld inherit Exception.

Direct children types

AssertFail
Represents failed assertion, thrown by assert(). Should be used to catch programming errors.
Error
Represents an error. Usually more specific error types are used.
Direct subtypes: 14
ExecutableNotFound
Occurs when executable was not found in path or when executable was absolute or relative and was not found.
ExitCodeFail
Represents error when converting program execution result to exit code
ExitException
Represents an exception that should cause exit from the program
Direct subtypes: 2
InstantiatingAbstractType
Represents an attempt to create an instance of an abstract type (not intended for instantiation).
LockFail
Failure to perform an operation on a lock.
MainFail
Undocumented
NoNext
Represents attempt to fetch next value of an iterator when it's exhausted
NotImplemented
Undocumented
ReadFail
Undocumented
RequireFail
Undocumented
Return
Return instance type, when thrown, will exit the call frame where they were created returning given value.
ThreadFail
Parent type of various thread exceptions
UndefinedLocalVar
Represents an error of reading undefined local variable.

Methods

exception_specific_message(e:Exception) Source: stdlib.ngs:5938
Do nothing. Catch-all for exception_specific_message().

Returns

EmptyBox
ExitCode(e:Exception) Source: bootstrap.ngs:51
Undocumented

Returns

Always 240
init(e:Exception, message:Str) Source: bootstrap.ngs:7
Initialize an Exception.

Parameters

messageGoes into .message

Returns

Exception with .backtrace and .message
init(e:Exception, cause:Exception) Source: bootstrap.ngs:13
Initialize an Exception.

Returns

Exception with .backtrace and .cause
init(e:Exception, message:Str, cause:Exception) Source: bootstrap.ngs:19
Initialize an Exception.

Returns

Exception with .backtrace, .message, and .cause
init(f:Failure, e:Exception) Source: stdlib.ngs:3039
Initialize Failure with the given value.
print_exception(e:Exception) Source: bootstrap.ngs:245
Uses built-in dump() to show an exception. Only used if stdlib is not loaded (stdlib defines better method).
print_exception(e:Exception, level:Int=0, parent:Exception=null) Source: stdlib.ngs:6106
Print exception to stderr. Uses inspect().

Parameters

levelindentation level to use (two spaces for each level)
parentparent exception if print_exception() was called for .cause exception