diff options
author | Florian Dold <florian@dold.me> | 2022-09-21 12:40:02 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-21 12:40:11 +0200 |
commit | 28b4489bead6cd88db1b91e0e0ae8b8e0d1d0007 (patch) | |
tree | 2ffbe9d0b63aef8cc91cba28f4c65dd1b5a94a02 /packages/taler-wallet-core/src/errors.ts | |
parent | 859991a40c4a7757d874f9ae6e6db7b76145a3c3 (diff) |
wallet-core: make basic backup work again
Diffstat (limited to 'packages/taler-wallet-core/src/errors.ts')
-rw-r--r-- | packages/taler-wallet-core/src/errors.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/errors.ts b/packages/taler-wallet-core/src/errors.ts index 62bde667d..0f4c480cd 100644 --- a/packages/taler-wallet-core/src/errors.ts +++ b/packages/taler-wallet-core/src/errors.ts @@ -113,6 +113,19 @@ function getDefaultHint(code: number): string { } } +export class TalerProtocolViolationError<T = any> extends Error { + constructor(hint?: string) { + let msg: string; + if (hint) { + msg = `Taler protocol violation error (${hint})`; + } else { + msg = `Taler protocol violation error`; + } + super(msg); + Object.setPrototypeOf(this, TalerProtocolViolationError.prototype); + } +} + export class TalerError<T = any> extends Error { errorDetail: TalerErrorDetail & T; private constructor(d: TalerErrorDetail & T) { |