12 lines
209 B
JavaScript
12 lines
209 B
JavaScript
'use strict';
|
|
|
|
function throwError(message, params) {
|
|
var error = new Error(message);
|
|
for (var key in params) {
|
|
error[key] = params[key];
|
|
}
|
|
throw error;
|
|
}
|
|
|
|
module.exports = throwError;
|