zxing-typescript
Version:
TypeScript port of ZXing open-source, multi-format 1D/2D barcode image processing library
28 lines (23 loc) • 1.06 kB
text/typescript
export default class Exception {
public static IllegalArgumentException = "IllegalArgumentException"
public static NotFoundException = "NotFoundException"
public static ArithmeticException = "ArithmeticException"
public static FormatException = "FormatException"
public static ChecksumException = "ChecksumException"
public static WriterException = "WriterException"
public static IllegalStateException = "IllegalStateException"
public static UnsupportedOperationException = "UnsupportedOperationException"
public static ReedSolomonException = "ReedSolomonException"
public static ArgumentException = "ArgumentException"
public static ReaderException = "ReaderException"
public constructor(private type: string, private message?: string) {}
public getType(): string {
return this.type
}
public getMessage(): string|undefined {
return this.message
}
public static isOfType(ex: any, type: string): boolean {
return ex.type === type
}
}