2024-10-03 17:16:42 +02:00
|
|
|
export class JsTimeoutError extends Error {
|
|
|
|
static message = "Timed out while executing JS"
|
|
|
|
static code = "JS_TIMEOUT_ERROR"
|
|
|
|
code: string = JsTimeoutError.code
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
super(JsTimeoutError.message)
|
|
|
|
}
|
2024-02-02 12:02:09 +01:00
|
|
|
}
|
2024-10-03 14:07:22 +02:00
|
|
|
|
|
|
|
export class UserScriptError extends Error {
|
2024-10-03 16:56:19 +02:00
|
|
|
static code = "USER_SCRIPT_ERROR"
|
2024-10-03 17:16:42 +02:00
|
|
|
code: string = UserScriptError.code
|
2024-10-03 14:07:22 +02:00
|
|
|
|
|
|
|
constructor(readonly userScriptError: Error) {
|
|
|
|
super(
|
2024-10-03 14:11:01 +02:00
|
|
|
`error while running user-supplied JavaScript: ${userScriptError.toString()}`
|
2024-10-03 14:07:22 +02:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|