resourceloader: Use state "error" instead of "missing" in case of exceptions
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 17 Oct 2013 10:33:26 +0000 (12:33 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 15 Nov 2013 01:32:48 +0000 (02:32 +0100)
commitf46f21915a84fc0e0eca84ccdddfd1ed01418ee7
tree238eb9a5ba5389328c71782a1b2b59a40ba218f0
parenta60643422ba87bba57417663f3aadc6a3e1f9b3b
resourceloader: Use state "error" instead of "missing" in case of exceptions

Changes:
* If we catch an exception while making the response for a module, set its
  client state to "error" instead of "missing".
  State "missing" should only be used if the module could not be
  found in the registry.
  This matches the behaviour of the client.

Clean up:
* Merge the two mw.loader.state calls into one.
* Add @throws documentation for compileLESSFile (follows-up cdc8b9e).
* Don't use 3 different ways to assert an array being empty,
  using 1 and sticking to it.
  - !$arr
  - $arr === array()
  - count( $arr )

Change-Id: I54c3de6d836702ffbe3044bc58a38e83e758bc33
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderFileModule.php