aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/css-tree/cjs/utils/create-custom-error.cjs
diff options
context:
space:
mode:
Diffstat (limited to 'vanilla/node_modules/css-tree/cjs/utils/create-custom-error.cjs')
-rw-r--r--vanilla/node_modules/css-tree/cjs/utils/create-custom-error.cjs18
1 files changed, 0 insertions, 18 deletions
diff --git a/vanilla/node_modules/css-tree/cjs/utils/create-custom-error.cjs b/vanilla/node_modules/css-tree/cjs/utils/create-custom-error.cjs
deleted file mode 100644
index d1d3e53..0000000
--- a/vanilla/node_modules/css-tree/cjs/utils/create-custom-error.cjs
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-function createCustomError(name, message) {
- // use Object.create(), because some VMs prevent setting line/column otherwise
- // (iOS Safari 10 even throws an exception)
- const error = Object.create(SyntaxError.prototype);
- const errorStack = new Error();
-
- return Object.assign(error, {
- name,
- message,
- get stack() {
- return (errorStack.stack || '').replace(/^(.+\n){1,3}/, `${name}: ${message}\n`);
- }
- });
-}
-
-exports.createCustomError = createCustomError;