budibase/packages/string-templates/src/errors.ts

14 lines
332 B
TypeScript
Raw Normal View History

2024-02-21 19:40:50 +01:00
export class JsErrorTimeout extends Error {
2024-10-03 16:56:19 +02:00
static code = "ERR_SCRIPT_EXECUTION_TIMEOUT"
}
export class UserScriptError extends Error {
2024-10-03 16:56:19 +02:00
static code = "USER_SCRIPT_ERROR"
constructor(readonly userScriptError: Error) {
super(
2024-10-03 14:11:01 +02:00
`error while running user-supplied JavaScript: ${userScriptError.toString()}`
)
}
}