resourceloader: Don't catch LESS error in ResourceLoaderFileModule
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 8 Oct 2013 21:47:42 +0000 (23:47 +0200)
committerOri.livneh <ori@wikimedia.org>
Mon, 14 Oct 2013 17:49:21 +0000 (17:49 +0000)
commitcdc8b9e01113fa78dc211c278a06ff08a4b5bb5a
tree62290515a273691c55705eb656dc44d548e026b7
parent686ab11eade025236064b07cd4e16f61022d7e11
resourceloader: Don't catch LESS error in ResourceLoaderFileModule

Instead let it throw up to ResourceLoader::makeModuleResponse.. By using
the central logic for exception handling the parse error becomes more
discoverable and obvious.

* The module is marked as in "error" state (currently it would still serve
  the result of file A and C, even if file B has a parse error).
  This matches the behaviour of the javascript checker we have.
* The exception comment is produced on top of the load.php response
  (where users expect it) instead of buried somewhere between the
  different modules and the different files within the modules.
* The exception comment will not be stripped out by CSSMin.
* DRY :)

Without this, debugging less parse errors is harder than it should be.

Bug: 55442
Change-Id: I6510b43f02cf82568b7fd2421209a8e636d5e115
includes/resourceloader/ResourceLoaderFileModule.php