Merge pull request #6 from kevinrambaud/master

Fix incomplete function declaration for appError
This commit is contained in:
Yoni Goldberg
2017-10-31 18:30:10 +02:00
committed by GitHub

View File

@ -42,13 +42,15 @@ if(!productToAdd)
```javascript
//centralized error object that derives from Nodes Error
function name, httpCode, description, isOperational) {
function appError(name, httpCode, description, isOperational) {
Error.call(this);
Error.captureStackTrace(this);
this.name = name;
//...other properties assigned here
};
appError.prototype.__proto__ = Error.prototype;
module.exports.appError = appError;
//client throwing an exception