This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Revert "util: always display a warning for module in debug mode"

This reverts commit df62005.
  • Loading branch information...
1 parent df62005 commit 03e689fae45ce31282b588f424988f90c9d652bb @indutny indutny committed Jan 16, 2012
Showing with 9 additions and 10 deletions.
  1. +9 −10 lib/util.js
View
@@ -522,16 +522,15 @@ exports.inherits = function(ctor, superCtor) {
var deprecationWarnings;
exports._deprecationWarning = function(moduleId, message) {
- if ((new RegExp('\\b' + moduleId + '\\b')).test(process.env.NODE_DEBUG)) {
+ if (!deprecationWarnings)
+ deprecationWarnings = {};
+ else if (message in deprecationWarnings)
+ return;
+
+ deprecationWarnings[message] = true;
+
+ if ((new RegExp('\\b' + moduleId + '\\b')).test(process.env.NODE_DEBUG))
console.trace(message);
- } else {
- if (!deprecationWarnings) {
- deprecationWarnings = {};
- } else if (message in deprecationWarnings) {
- return;
- }
+ else
console.error(message);
-
- deprecationWarnings[message] = true;
- }
};

0 comments on commit 03e689f

Please sign in to comment.