mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-07-24 12:41:50 +00:00
Translated error messages
This commit is contained in:
10
src/util/error.ts
Normal file
10
src/util/error.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/** Error class adding an error code used for i18n. */
|
||||
export class TopolaError extends Error {
|
||||
constructor(
|
||||
public readonly code: string,
|
||||
message: string,
|
||||
public readonly args: {[key: string]: string} = {},
|
||||
) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user