Error

Moduleejs
Namespaceintrinsic
Definitiondynamic class Error
InheritanceError inherit Object

Base class for error exception objects.

Exception objects are created by the system as part of changing the normal flow of execution when some error condition occurs. When an exception is created and acted upon ("thrown"), the system transfers the flow of control to a pre-defined instruction stream (the handler or "catch" code). The handler may return processing to the point at which the exception was thrown or not. It may re-throw the exception or pass control up the call stack.


Properties

QualifiersPropertyTypeDescription
internal-11 messageStringException error message.
internal-11 stackStringExecution stack backtrace. Contains the execution stack backtrace at the time the exception was thrown.

Error Methods

QualifiersMethod
internal-11 get code(): Number
 Get an optional error code.
internal-11 set code(value: Number): Void
 Set an optional error code.
Error(message: String)
 Construct a new Error object.

Method Detail

get internal-11 code(): Number

Get an optional error code.

Returns
Any defined error code.

set internal-11 code(value: Number): Void

Set an optional error code.

Parameters
value: Number Error code to set

Error(message: String)

Construct a new Error object.

Parameters
message: String Message to use when defining the Error.message property