首次放到 git
This commit is contained in:
11
utils/throw-error.js
Normal file
11
utils/throw-error.js
Normal file
@@ -0,0 +1,11 @@
|
||||
'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;
|
||||
Reference in New Issue
Block a user