aboutsummaryrefslogtreecommitdiff
path: root/lib/utils.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai.bazon@gmail.com>2013-12-10 10:23:29 -0800
committerMihai Bazon <mihai.bazon@gmail.com>2013-12-10 10:23:29 -0800
commit248f304f02528f1e63c11707f3159e456baac139 (patch)
tree3c34df949bd6d77d5f1a5564dc4228a6fda2bdb1 /lib/utils.js
parentdc5f70eab5cf89f1046482e97267030b3bbf2b66 (diff)
parentdfa395f6ff405bbea018dbc24b31cbd49a9ac6ef (diff)
downloadtracifyjs-248f304f02528f1e63c11707f3159e456baac139.tar.gz
tracifyjs-248f304f02528f1e63c11707f3159e456baac139.zip
Merge pull request #245 from ForbesLindesay/patch-1
Make `DefaultsError` a real `Error` object
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js
index fa24663c..c7299e57 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -82,9 +82,12 @@ function repeat_string(str, i) {
};
function DefaultsError(msg, defs) {
+ Error.call(this, msg)
this.msg = msg;
this.defs = defs;
};
+DefaultsError.prototype = Object.create(Error.prototype)
+DefaultsError.prototype.constructor = DefaultsError
DefaultsError.croak = function(msg, defs) {
throw new DefaultsError(msg, defs);