@firstfleet/fferrorhandler
Advanced tools
+3
-3
| { | ||
| "name": "@firstfleet/fferrorhandler", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "handle errors", | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "publish": "npm publish --access public", | ||
| "send": "npm publish --access public", | ||
| "build-docs": "documentation build index.js -f md --shallow -o docs.md" | ||
@@ -13,4 +13,4 @@ }, | ||
| "dependencies": { | ||
| "@firstfleet/fflogger": "1.0.2" | ||
| "@firstfleet/fflogger": "1.0.3" | ||
| } | ||
| } |
+4
-4
@@ -9,3 +9,3 @@ # @firstfleet/fferrorhandler | ||
| The error handler also handles all uncaughtException, and unhandledRejection. On uncaughtException if the error | ||
| is Operational, the process is restarted after the error is logged. | ||
| is Programmer, the process is restarted after the error is logged. | ||
@@ -20,3 +20,3 @@ If you update the js docs you can rebuild them by running | ||
| 3) Make sure you have been added to the firstfleet org | ||
| 2) run ```npm run publish``` | ||
| 2) run ```npm run send``` | ||
@@ -32,3 +32,3 @@ # Error Handler | ||
| ```js | ||
| throw new AppError('Invalid Input', 'Describe what happened', true); | ||
| throw new AppError('Node1', 'ffmobileNode2', 'api call failed', errorLevels.COMMON, true); | ||
| ``` | ||
@@ -46,3 +46,3 @@ | ||
| handlerError(sender, program, message, severity, isOperational); | ||
| handleError('Node1', 'ffmobileNode2', errorLevels.COMMON, true); | ||
| handleError('Node1', 'ffmobileNode2', 'totally broke the input box by adding script tags', errorLevels.COMMON, true); | ||
| ``` | ||
@@ -49,0 +49,0 @@ |
8291
0.83%Updated