/**
 * Defines operation (encryption or decryption) during which error occurred.
 */ export enum EncryptionErrorOperation { Encryption , Decryption } export class EncryptionError extends Error { constructor ( message , public readonly attributeName , public readonly operation , public readonly cause ? ) { super ( message ) ; Object . setPrototypeOf ( this , EncryptionError . prototype ) ; } toJSON ( ) { return { message : this . message } ; } }