summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-03-05 17:46:37 -0800
committerisaacs <i@izs.me>2013-03-06 11:44:29 -0800
commit5038f4018534f498734fc39ef1bcd72650a3e7e2 (patch)
tree6fb5795ded2af9182b0542614c8cbb6bed0ed32a /lib
parent25ba971f41d4ddaf7e241645cfc2917bd3afa1f7 (diff)
downloadandroid-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.js4
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);