public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1febde
)
Make `DefaultsError` a real `Error` object
author
Forbes Lindesay
<forbes@lindesay.co.uk>
Mon, 22 Jul 2013 00:44:03 +0000
(
01:44
+0100)
committer
Forbes Lindesay
<forbes@lindesay.co.uk>
Mon, 22 Jul 2013 00:44:03 +0000
(
01:44
+0100)
lib/utils.js
patch
|
blob
|
history
diff --git
a/lib/utils.js
b/lib/utils.js
index
73964a0
..
20f9a8e
100644
(file)
--- 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
function defaults(args, defs, croak) {
if (args === true)