From 28b4489bead6cd88db1b91e0e0ae8b8e0d1d0007 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 21 Sep 2022 12:40:02 +0200 Subject: wallet-core: make basic backup work again --- packages/taler-wallet-core/src/errors.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'packages/taler-wallet-core/src/errors.ts') 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 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 extends Error { errorDetail: TalerErrorDetail & T; private constructor(d: TalerErrorDetail & T) { -- cgit v1.2.3