diff options
author | isaacs <i@izs.me> | 2013-03-05 17:46:37 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-03-06 11:44:29 -0800 |
commit | 5038f4018534f498734fc39ef1bcd72650a3e7e2 (patch) | |
tree | 6fb5795ded2af9182b0542614c8cbb6bed0ed32a /lib | |
parent | 25ba971f41d4ddaf7e241645cfc2917bd3afa1f7 (diff) | |
download | android-node-v8-5038f4018534f498734fc39ef1bcd72650a3e7e2.tar.gz android-node-v8-5038f4018534f498734fc39ef1bcd72650a3e7e2.tar.bz2 android-node-v8-5038f4018534f498734fc39ef1bcd72650a3e7e2.zip |
node: Add --throw-deprecation
Extremely handy when tracking down a flood of recursive nextTick warnings.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/util.js b/lib/util.js index a71876adbd..40b0680b37 100644 --- a/lib/util.js +++ b/lib/util.js @@ -65,7 +65,9 @@ exports.deprecate = function(fn, msg) { var warned = false; function deprecated() { if (!warned) { - if (process.traceDeprecation) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { console.trace(msg); } else { console.error(msg); |