resourceloader: Reduce severity for non-fatal JS errors to warn()
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 5 Sep 2017 15:29:34 +0000 (17:29 +0200)
committerKrinkle <krinklemail@gmail.com>
Tue, 5 Sep 2017 15:31:09 +0000 (15:31 +0000)
commit4f003bdd6092c4d21fa38c7a3bef11322f371fa1
tree2556460b4a1a4fc4062c2807ce6ccb07ef1e76a6
parent2ec7dbb4892cef0a75ac05304b6ac7779a3835c4
resourceloader: Reduce severity for non-fatal JS errors to warn()

Follows-up 37df74151 and 12cca1c6, which made the internal exceptions
from sortDependencies() for unknown modules, or circular dependencies,
get logged to the console instead of silently caught.

There were logged using mw.track('resourceloader.exception') which
get logged to the console using console.error() by default.

Change this to using console.warn() instead.

Until 37df74151 and 12cca1c6, messages from `resourceloader.exception` where
quite rare. However both the rare cases, as well as the cases we added in
these commits, are non-fatal. Given various false reports in recent weeks
on Phabricator from users thinking they are witnessing fatal errors, let's
change the severity level of these in the browser console to "warn" instead
of "error", which makes them easier to distinguish from fatal errors.

Change-Id: I8d7aff6c72e74836c034b18a5ff58428d27628ff
resources/src/mediawiki/mediawiki.js