# Exception

The ancestor class of all exceptions.

Refer to Built-in Exception Classes for information on its subclasses.

### Superclass

* Object

### Class Method

Exception.new(\[error\_message])

Creates and returns a new exception object. A string indicating an error message can be supplied as an argument. This message will become the value of the [message](https://enls.gitbook.io/rgss-reference-manual/standard-library/built-in-classes/object/broken-reference) attribute (below) and will be displayed by the default exception handler.

### Methods

exception(\[error\_message])

Returns self when no argument is specified. Otherwise, creates a copy of itself with the [message](https://enls.gitbook.io/rgss-reference-manual/standard-library/built-in-classes/object/broken-reference) attribute as error\_message and returns it.

raise actually calls the Exception object's exception method.

backtrace

Returns backtrace information as a String array in the follow formats:

* "#{sourcefile}:#{sourceline}:in '#{method}'"

  (within methods)
* "#{sourcefile}:#{sourceline}"

  (at the top level)

message

Returns the error message string.
