Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
diff --git a/www/FileError.js b/www/FileError.js index 6507921..eb681d6 100644 --- a/www/FileError.js +++ b/www/FileError.js @@ -24,8 +24,17 @@ */ function FileError(error) { this.code = error || null; + + this.name = this.constructor.name; + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = (new Error(error)).stack; + } } +FileError.prototype = new Error(); +