export class TdfError extends Error {
    constructor(message, cause) {
        super(message, { cause });
        this.name = 'TdfError';
        // Error is funny (only on ES5? So  guess just IE11 we have to worry about?)
        // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
        // https://stackoverflow.com/questions/41102060/typescript-extending-error-class#comment70895020_41102306
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
export class AttributeValidationError extends TdfError {
    constructor() {
        super(...arguments);
        this.name = 'AttributeValidationError';
    }
}
export class KasDecryptError extends TdfError {
    constructor() {
        super(...arguments);
        this.name = 'KasDecryptError';
    }
}
export class KasUpsertError extends TdfError {
    constructor() {
        super(...arguments);
        this.name = 'KasUpsertError';
    }
}
export class KeyAccessError extends TdfError {
    constructor() {
        super(...arguments);
        this.name = 'KeyAccessError';
    }
}
export class KeySyncError extends TdfError {
    constructor() {
        super(...arguments);
        this.name = 'KeySyncError';
    }
}
export class IllegalArgumentError extends Error {
}
export class IllegalEnvError extends Error {
}
export class ManifestIntegrityError extends TdfError {
    constructor() {
        super(...arguments);
        this.name = 'ManifestIntegrityError';
    }
}
export class PolicyIntegrityError extends TdfError {
    constructor() {
        super(...arguments);
        this.name = 'PolicyIntegrityError';
    }
}
export class TdfCorruptError extends TdfError {
    constructor(message, err, reason) {
        super(message, err);
        this.name = 'TdfCorruptError';
        this.reason = reason;
    }
}
export class TdfDecryptError extends TdfError {
    constructor() {
        super(...arguments);
        this.name = 'TdfDecryptError';
    }
}
export class TdfPayloadExtractionError extends TdfError {
    constructor() {
        super(...arguments);
        this.name = 'TdfPayloadExtractionError';
    }
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vdGRmMy9zcmMvZXJyb3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sT0FBT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