@dvcol/common-utils
Version:
Typescript library for common utility functions and constants
26 lines (18 loc) • 901 B
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true});// lib/common/models/error.model.ts
var ErrorTypes = /* @__PURE__ */ ((ErrorTypes2) => {
ErrorTypes2["PARSING_RELATIVE_PATH_ERROR"] = "PARSING_RELATIVE_PATH_ERROR";
return ErrorTypes2;
})(ErrorTypes || {});
var ParsingError = class extends Error {
constructor(type, error, message = `Parsing error: ${type}`) {
super(message);
this.type = type;
this.error = error;
}
};
var ParsingRelativePathError = class extends ParsingError {
constructor({ parent, relative }, message = `Error parsing relative path "${relative}" from parent path "${parent}"`) {
super("PARSING_RELATIVE_PATH_ERROR" /* PARSING_RELATIVE_PATH_ERROR */, { parent, relative }, message);
}
};
exports.ErrorTypes = ErrorTypes; exports.ParsingError = ParsingError; exports.ParsingRelativePathError = ParsingRelativePathError;