From bdac16978c6827bb5d8709071ee8afb99707ec3e Mon Sep 17 00:00:00 2001 From: Krinkle Date: Wed, 18 May 2011 20:31:28 +0000 Subject: [PATCH] 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. --- resources/mediawiki/mediawiki.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index 0533baf6fd..de7a2cd668 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -509,8 +509,8 @@ window.mediaWiki = new ( function( $ ) { // and not in debug mode, such as when a symbol that should be global isn't exported if ( window.console && typeof window.console.log === 'function' ) { console.log( _fn + 'Exception thrown by ' + module + ': ' + e.message ); - console.log( e ); } + throw e; registry[module].state = 'error'; } } -- 2.20.1