ExceptionClass
Provides non-failing access to some of ::Exception’s methods. Used in subsystems where unhandled failure isn’t an option, such as Inspect and Results::Error. Also uses Encode so that all strings are ready for output.
Children
- Backtrace
-
Provides non-failing access to an exception backtrace.
- Unknown
-
Wraps an exception that was raised while trying to determine an exception’s class to make it behave like an exception class.
Constructor
initialize(exception::Exception)#⚙
Provides non-failing access to exception’s message, backtrace, and type.
Instance Methods
messageString#⚙
Returns the UTF-8-encoded exception message or the UTF-8-encoded exception message of any exception that was raised while trying to retrieve it.
headerString#⚙
Returns a heuristically generated UTF-8-encoded exception message “header”, possibly containing the exception message and the exception’s class’ name.
backtraceBacktrace#⚙
Returns a non-failing backtrace wrapper of the exception backtrace.
type#name, #inspect#⚙
Returns either the exception’s class or an Unknown wrapper around the exception that was raised while trying to determine the class.
type_nameString#⚙
Returns the UTF-8-encoded name of the exception’s class.
formatString#⚙
Returns the #header and #backtrace separated by a newline.