source: trip-planner-front/node_modules/adjust-sourcemap-loader/lib/process/get-error.js@ 8d391a1

Last change on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 414 bytes
Line 
1'use strict';
2
3var PACKAGE_NAME = require('../../package.json').name;
4
5/**
6 * Get an Error instance for the given message
7 * @param {...*} message Any number of message arguments
8 * @returns {Error}
9 */
10function getError() {
11 var message = (PACKAGE_NAME + ':\n' + Array.prototype.slice.call(arguments).join(' '))
12 .split(/\s*\n\s*/)
13 .join('\n ');
14 return new Error(message);
15}
16
17module.exports = getError;
Note: See TracBrowser for help on using the repository browser.