error-ninja
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -18,2 +18,11 @@ 'use strict'; | ||
/* | ||
* A factory that returns a function that converts an error and then throws it. | ||
*/ | ||
function _throw (id, data, outputData) { | ||
return (err) => { | ||
throw this.convert(err, id, data, outputData); | ||
}; | ||
}; | ||
/* | ||
* Returns true if the given input is an error, or optionally an ErrorNinja. | ||
@@ -49,11 +58,2 @@ */ | ||
/* | ||
* A factory that returns a function that converts an error and then throws it. | ||
*/ | ||
const _throw = ME.throw = function _throw (id, data, outputData) { | ||
return (err) => { | ||
throw convert(err, id, data, outputData); | ||
}; | ||
} | ||
/* | ||
* Store error definitions and construct the ErrorNinja. | ||
@@ -60,0 +60,0 @@ */ |
@@ -10,3 +10,3 @@ { | ||
"name": "error-ninja", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "Allows us to pre-define error types and error messages in each module.", | ||
@@ -13,0 +13,0 @@ "keywords": [ |
8052