exception.exception - Palamecia/mint GitHub Wiki

Module exception.exception

Description

load exception.exception

This module provides the Exception.Exception class which is a base class to create exception contexts.

Packages

Classes

Exception.Cause

This class provides the cause context from an exception.

Public members

Modifiers Member Description
const getCause Returns the parent cause of this cause as an instance of Exception.Cause.Exce...
const getCauses Returns the parent causes of this cause as an array of Exception.Cause.Except...
const getDepth Returns the chaining depth of this cause as a number. The depth starts from 0...
const getObject Returns the exception object associated to this cause.
const new Creates a new exception cause context for the exception object object and the...
const stacktrace Returns the stacktrace for this cause as an array of Exception.Cause.StackFrame...

Private members

Modifiers Member Description
final depth Internal chaining depth.
@ const g_lib Global library handle.
final % object Internal exception object.

Exception.Exception

This class provides a base to create exception contexts.

Exception.InvalidOperation

This class provides the context of an exception raised on attempt to perform an invalide operation on an object.

Inherits

Public members

Modifiers Member Description
const getMessage Returns the error description.
const getObject Returns the object that raised the error.
const new Creates a new context. The message parameter provides a description of the at...
const toString Returns the exception informations as a string.

Private members

Modifiers Member Description
final message Internal error message.
final object Internal object.

Exception.RuntimeError

This class provides a default runtime exception implementation that contains an error message.

Inherits

Public members

Modifiers Member Description
const new Creates a runtime error with the message error message.
const toString Returns the error message.

Private members

Modifiers Member Description
final message Internal error message.

Functions

Descriptions

Exception.Cause.depth

none

Internal chaining depth.

Exception.Cause.g_lib

lib ('libmint-exception')

Global library handle.

Exception.Cause.getCause

def (const self)

Returns the parent cause of this cause as an instance of Exception.Cause or none if this cause is the root cause.

Exception.Cause.getCauses

def (const self)

Returns the parent causes of this cause as an array of Exception.Cause starting from the root cause or none if this cause is the root cause.

Exception.Cause.getDepth

def (const self)

Returns the chaining depth of this cause as a number. The depth starts from 0 for the root cause and increase for each reraise.

Exception.Cause.getObject

def (const self)

Returns the exception object associated to this cause.

Exception.Cause.new

def (self, % object, depth)

Creates a new exception cause context for the exception object object and the exception chain depth depth. The depth start from 0 for the root exception and increase for each reraise.

Exception.Cause.object

null

Internal exception object.

Exception.Cause.stacktrace

def (const self)

Returns the stacktrace for this cause as an array of StackFrame or none if the stacktrace is unknown.

Exception.InvalidOperation.getMessage

def (const self)

Returns the error description.

Exception.InvalidOperation.getObject

def (const self)

Returns the object that raised the error.

Exception.InvalidOperation.message

''

Internal error message.

Exception.InvalidOperation.new

def (self, message, object)

Creates a new context. The message parameter provides a description of the attempted operation. The object parameter is the object that raised the error.

Exception.InvalidOperation.object

null

Internal object.

Exception.InvalidOperation.toString

def (const self)

Returns the exception informations as a string.

Exception.RuntimeError.message

''

Internal error message.

Exception.RuntimeError.new

def (self, message)

Creates a runtime error with the message error message.

Exception.RuntimeError.toString

def (const self)

Returns the error message.

Exception.cause

def (error)

Returns the cause exception for error as an insistance of Exception.Cause or none if error is not an object from the current exception chain or is the root cause. The error parameter can be an instance of Exception.Cause or the object that was raised.

Exception.causes

def (error)

Returns the causes exceptions for error as an array of Exception.Cause or none if error is not an object from the current exception chain. The causes list start from the root cause until the the error that caused error excluding it. The error parameter can be an instance of Exception.Cause or the object that was raised.

Exception.stacktrace

def ()

Returns the current exception's stacktrace as an array of StackFrame.

def (cause)

Returns the stacktrace for the cause exception object as an array of StackFrame or none if cause is not an object from the current exception chain. The cause parameter can be an instance of Exception.Cause or the object that was raised.