UNPKG

@dvcol/common-utils

Version:

Typescript library for common utility functions and constants

26 lines (24 loc) 773 B
// 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 { type; 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); } }; export { ErrorTypes, ParsingError, ParsingRelativePathError };