UNPKG

asn1-ts

Version:

ASN.1 encoding and decoding, including BER, CER, and DER.

77 lines (76 loc) 2.24 kB
export class ASN1Error extends Error { constructor(m, element) { super(m); this.m = m; this.element = element; Object.setPrototypeOf(this, ASN1Error.prototype); } } export class ASN1NotImplementedError extends ASN1Error { constructor() { super("Not yet implemented."); Object.setPrototypeOf(this, ASN1NotImplementedError.prototype); } } export class ASN1RecursionError extends ASN1Error { constructor() { super("Recursion was too deep."); Object.setPrototypeOf(this, ASN1RecursionError.prototype); } } export class ASN1TruncationError extends ASN1Error { constructor(m, element) { super(m, element); this.m = m; this.element = element; Object.setPrototypeOf(this, ASN1TruncationError.prototype); } } export class ASN1OverflowError extends ASN1Error { constructor(m, element) { super(m, element); this.m = m; this.element = element; Object.setPrototypeOf(this, ASN1OverflowError.prototype); } } export class ASN1SizeError extends ASN1Error { constructor(m, element) { super(m, element); this.m = m; this.element = element; Object.setPrototypeOf(this, ASN1SizeError.prototype); } } export class ASN1PaddingError extends ASN1Error { constructor(m, element) { super(m, element); this.m = m; this.element = element; Object.setPrototypeOf(this, ASN1PaddingError.prototype); } } export class ASN1UndefinedError extends ASN1Error { constructor(m, element) { super(m, element); this.m = m; this.element = element; Object.setPrototypeOf(this, ASN1UndefinedError.prototype); } } export class ASN1CharactersError extends ASN1Error { constructor(m, element) { super(m, element); this.m = m; this.element = element; Object.setPrototypeOf(this, ASN1CharactersError.prototype); } } export class ASN1ConstructionError extends ASN1Error { constructor(m, element) { super(m, element); this.m = m; this.element = element; Object.setPrototypeOf(this, ASN1ConstructionError.prototype); } }