// throwing a simple exception:
throw new jsx3.Exception("an error occurred");
// throwing a nested exception:
try {
...
} catch (e) {
throw new jsx3.Exception("an error occurred while ...",
jsx3.NativeError.wrap(e));
}
// catching an exception and logging it
try {
...
} catch (e) {
jsx3.util.Logger.GLOBAL.error("an error occurred while ...",
jsx3.NativeError.wrap(e));
}
| Constructor Summary | |
|---|---|
| void | The instance initializer. |
| Method Summary | |
|---|---|
| jsx3.lang.Exception | getCause() Returns the cause of this exception, if one was specified in the constructor. |
| String | Returns the description of this exception, as specified when the constructor was called. |
| Array<Function> | getStack() Returns the complete call stack from when this exception was instantiated as an array of functions. |
| String | Returns a string representation of the call stack for when this exception was instantiated. |
| String | toString() Returns a string representation of this exception. |
| Methods Inherited From jsx3.lang.Object |
|---|
| clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf |
| Constructor Detail |
|---|
init() method.| Method Detail |
|---|