resourceloader: Reduce severity for non-fatal JS errors to warn()
[lhc/web/wiklou.git] / resources / src / mediawiki / mediawiki.js
index c5989c0..fc930ca 100644 (file)
                        msg += ( e ? ':' : '.' );
                        console.log( msg );
 
-                       // If we have an exception object, log it to the error channel to trigger
-                       // proper stacktraces in browsers that support it. No fallback as we have
-                       // no browsers that don't support error(), but do support log().
-                       if ( e && console.error ) {
-                               console.error( String( e ), e );
+                       // If we have an exception object, log it to the warning channel to trigger
+                       // proper stacktraces in browsers that support it.
+                       if ( e && console.warn ) {
+                               console.warn( String( e ), e );
                        }
                }
                /* eslint-enable no-console */