mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-17 04:33:15 +02:00
16 lines
454 B
TypeScript
16 lines
454 B
TypeScript
|
|
export class ErrorPageException extends Error {
|
||
|
|
/**
|
||
|
|
* Exception for redirecting to error page (all i18n key should omit `error.msg` and `error.param` prefix)
|
||
|
|
* @param key i18n key of message
|
||
|
|
* @param redirect redirect url
|
||
|
|
* @param params message params (key)
|
||
|
|
*/
|
||
|
|
constructor(
|
||
|
|
public readonly key: string = "default",
|
||
|
|
public readonly redirect: string = "/",
|
||
|
|
public readonly params?: string[],
|
||
|
|
) {
|
||
|
|
super("error");
|
||
|
|
}
|
||
|
|
}
|