broccoli
Version:
Fast client-side asset builder
14 lines • 491 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = wrapPrimitiveErrors;
function wrapPrimitiveErrors(err) {
if (err !== null && typeof err === 'object') {
return err;
}
else {
// We could augment the message with " [string exception]" to indicate
// that the stack trace is not useful, or even set the .stack to null.
return new Error(err + '');
}
}
//# sourceMappingURL=wrap-primitive-errors.js.map