Files
pptx-image-compress/bin/svgo-client/node_modules/css-tree/cjs/utils/create-custom-error.cjs
T
frank.conrads 6c5a5256c7 Use local svgo.cmd wrapper binary
Switch SVG optimizer resolution from bin/svgo-cli.exe to bin/svgo.cmd.

Update unit tests to validate the new local binary path behavior.

Co-Authored-By: Abacus.AI CLI <agent@abacus.ai>
2026-06-08 14:51:40 +02:00

19 lines
532 B
JavaScript

'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;