ec-sri-invoice-signer
Version:
Ecuador SRI invoice signer.
37 lines (36 loc) • 1.47 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnsupportedDocumentTypeError = exports.UnsupportedXmlFeatureError = exports.XmlFormatError = exports.UnsuportedPkcs12Error = void 0;
class XmlFormatError extends Error {
constructor() {
const message = "There's a format error in your XML file";
super(message);
this.name = 'XmlFormatError';
}
}
exports.XmlFormatError = XmlFormatError;
class UnsuportedPkcs12Error extends Error {
constructor(extraMessage) {
let message = "The used .p12 file is not supported";
if (extraMessage) {
message += `: ${extraMessage}`;
}
super(message);
this.name = 'UnsuportedPkcs12Error';
}
}
exports.UnsuportedPkcs12Error = UnsuportedPkcs12Error;
class UnsupportedXmlFeatureError extends Error {
constructor(feature, description) {
super(`Unsupported XML feature: ${feature}. ${description}`);
this.name = 'UnsupportedXmlFeatureError';
}
}
exports.UnsupportedXmlFeatureError = UnsupportedXmlFeatureError;
class UnsupportedDocumentTypeError extends Error {
constructor(documentType) {
super(`Unsupported document type: ${documentType}. Supported types are: factura, liquidacionCompra, notaDebito, notaCredito, comprobanteRetencion, guiaRemision`);
this.name = 'UnsupportedDocumentTypeError';
}
}
exports.UnsupportedDocumentTypeError = UnsupportedDocumentTypeError;