Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -718,8 +718,12 @@ |
719 | 719 | } |
720 | 720 | } |
721 | 721 | } catch ( e ) { |
722 | | - mw.log( _fn + 'Exception thrown by ' + module + ': ' + e.message ); |
723 | | - mw.log( e ); |
| 722 | + // This needs to NOT use mw.log because these errors are common in production mode |
| 723 | + // and not in debug mode, such as when a symbol that should be global isn't exported |
| 724 | + if ( console && typeof console.log === 'function' ) { |
| 725 | + console.log( _fn + 'Exception thrown by ' + module + ': ' + e.message ); |
| 726 | + console.log( e ); |
| 727 | + } |
724 | 728 | registry[module].state = 'error'; |
725 | 729 | // Run error callbacks of jobs affected by this condition |
726 | 730 | for ( var j = 0; j < jobs.length; j++ ) { |