All files / lib VerifyPDFError.js

100% Statements 3/3
100% Branches 1/1
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27            5x                           12x 12x          
export class VerifyPDFError extends Error {
	/**
	 * Enum for VerifyPDFError types
	 * @readonly
	 * @enum {string}
	 */
	static Type = {
		TYPE_UNKNOWN: "TYPE_UNKNOWN",
		TYPE_INPUT: "TYPE_INPUT",
		TYPE_PARSE: "TYPE_PARSE",
		TYPE_BYTE_RANGE: "TYPE_BYTE_RANGE",
		VERIFY_SIGNATURE: "VERIFY_SIGNATURE",
		UNSUPPORTED_SUBFILTER: "UNSUPPORTED_SUBFILTER",
	};
 
	/**
	 * @param {string} msg
	 * @param {Type} type
	 */
	constructor(msg, type = VerifyPDFError.Type.TYPE_UNKNOWN) {
		super(msg);
		this.type = type;
	}
}
 
export default VerifyPDFError;