@microsoft/useragent-sdk
Version:
SDK for building decentralized identity wallets and enterprise agents.
25 lines • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/**
* Base error class for the crypto.
*/
class CryptoError extends Error {
/**
* Create instance of @class CryptoProtocolError
* @param protocol name
* @param message for the error
*/
constructor(algorithm, message) {
super(message);
// NOTE: Extending 'Error' breaks prototype chain since TypeScript 2.1.
// The following line restores prototype chain.
Object.setPrototypeOf(this, new.target.prototype);
this.algorithm = algorithm;
}
}
exports.default = CryptoError;
//# sourceMappingURL=CryptoError.js.map