Error
Module | ejs |
Namespace | intrinsic |
Definition | dynamic class Error |
Inheritance | Error ![]() |
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
Qualifiers | Property | Type | Description |
---|---|---|---|
internal-11 | message | String | Exception error message. |
internal-11 | stack | String | Execution stack backtrace. Contains the execution stack backtrace at the time the exception was thrown. |
Error Methods
Qualifiers | Method |
---|---|
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 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