From 7a52ddeba2a68388b544f529d2d92104420f77b0 Mon Sep 17 00:00:00 2001 From: Shipwreckt Date: Fri, 31 Oct 2025 20:02:14 +0000 Subject: Changed from static to 11ty! --- .../@11ty/eleventy/src/Errors/EleventyBaseError.js | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 node_modules/@11ty/eleventy/src/Errors/EleventyBaseError.js (limited to 'node_modules/@11ty/eleventy/src/Errors/EleventyBaseError.js') diff --git a/node_modules/@11ty/eleventy/src/Errors/EleventyBaseError.js b/node_modules/@11ty/eleventy/src/Errors/EleventyBaseError.js new file mode 100644 index 0000000..6e76c5f --- /dev/null +++ b/node_modules/@11ty/eleventy/src/Errors/EleventyBaseError.js @@ -0,0 +1,24 @@ +/** + * This class serves as basis for all Eleventy-specific errors. + * @ignore + */ +class EleventyBaseError extends Error { + /** + * @param {string} message - The error message to display. + * @param {unknown} [originalError] - The original error caught. + */ + constructor(message, originalError) { + super(message); + + this.name = this.constructor.name; + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + if (originalError) { + this.originalError = originalError; + } + } +} +export default EleventyBaseError; -- cgit v1.2.3