Creates a RealityServer error.
Name | Type | Description |
---|---|---|
message |
String |
optional
Human-readable description of the error. |
file_name |
String |
optional
The name of the file containing the code that caused the exception. |
line_number |
Number |
optional
The line number of the code that caused the exception. |
Examples
try {
await this.service.connect(url);
} catch(err) {
if (err instanceof RS.Error) {
// A RealityServer error
} else {
// some other error
}
}
try {
await this.service.connect(url);
} catch(err) {
if (err.name === 'RealityServerError') {
// A RealityServer error
} else {
// some other error
}
}
Extends
- Error