katoikia-app/web-ui/web-react/node_modules/adjust-sourcemap-loader/lib/process/get-error.js

17 lines
414 B
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
'use strict';
var PACKAGE_NAME = require('../../package.json').name;
/**
* Get an Error instance for the given message
* @param {...*} message Any number of message arguments
* @returns {Error}
*/
function getError() {
var message = (PACKAGE_NAME + ':\n' + Array.prototype.slice.call(arguments).join(' '))
.split(/\s*\n\s*/)
.join('\n ');
return new Error(message);
}
module.exports = getError;