From 29f50ac2fd2dba4bf2b254714c4565ca018d1222 Mon Sep 17 00:00:00 2001 From: "David Humphrey (:humph) david.humphrey@senecacollege.ca" Date: Mon, 18 Aug 2014 21:04:09 -0400 Subject: [PATCH] Add stacks --- src/errors.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/errors.js b/src/errors.js index 21e6112..f148947 100644 --- a/src/errors.js +++ b/src/errors.js @@ -78,6 +78,8 @@ var errors = {}; var defaultMessage = e[2]; function FilerError(msg, path) { + Error.call(this); + this.name = errName; this.code = errName; this.errno = errno; @@ -85,6 +87,7 @@ var errors = {}; if(path) { this.path = path; } + this.stack = (new Error(this.message)).stack; } FilerError.prototype = Object.create(Error.prototype); FilerError.prototype.constructor = FilerError;