format
typescript
Exception.nameclass: Exception
description
The specified name of the exception type, used to differentiate whether the thrown exception is of the specified type.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
string | The name of the exception type. |
code example
javascript
function Test() {
try {
throw new Exception("Exception test.");
} catch (error) {
Debug.log(error);
let exp = error as Exception;
if (exp.name != Exception.name) {
Debug.log("Is a 'Exception' type error");
}
}
}