r88392 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88391‎ | r88392 | r88393 >
Date:20:31, 18 May 2011
Author:krinkle
Status:ok
Tags:
Comment:
Changing console.log(e) to a throw. console.log makes it go toString() which is pretty much the same as the e.message in the console.log call above it. This also made it impossible for QUnit to get it's hand on the actual error. Fixed it by moing it outside of the if statement so it can be caught.
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -509,8 +509,8 @@
510510 // and not in debug mode, such as when a symbol that should be global isn't exported
511511 if ( window.console && typeof window.console.log === 'function' ) {
512512 console.log( _fn + 'Exception thrown by ' + module + ': ' + e.message );
513 - console.log( e );
514513 }
 514+ throw e;
515515 registry[module].state = 'error';
516516 }
517517 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r112451* Fix r111983 (bug 34662): make mw.toolbar.addButton() work even after DOM ready...tstarling22:46, 26 February 2012
r112453Re-add the exception log removed in r88392: unlike Chrome, the current Firebu...tstarling23:03, 26 February 2012

Status & tagging log