aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/css-tree/lib/utils/create-custom-error.js
diff options
context:
space:
mode:
Diffstat (limited to 'vanilla/node_modules/css-tree/lib/utils/create-custom-error.js')
-rw-r--r--vanilla/node_modules/css-tree/lib/utils/create-custom-error.js14
1 files changed, 0 insertions, 14 deletions
diff --git a/vanilla/node_modules/css-tree/lib/utils/create-custom-error.js b/vanilla/node_modules/css-tree/lib/utils/create-custom-error.js
deleted file mode 100644
index dba122f..0000000
--- a/vanilla/node_modules/css-tree/lib/utils/create-custom-error.js
+++ /dev/null
@@ -1,14 +0,0 @@
-export 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`);
- }
- });
-};