Thread:Talk:ResourceLoader/RL fails silently/reply

Hi,

It doesn't fail silently, it just isn't as visible as one might expect. It used to throw fatal exceptions. Since then we changed it to be less visible but still prevent features from breaking. This is done by using the "error" state in the module registry. If a module has any issues whatsoever it will still be registered and stuff won't break, but when it is needed on-demand, it will respond with an error code, so any callbacks queued to run when the module is loaded (e.g. anything having it as a dependency or the first callback from mw.loader.using) will not run. This is so that  will not break by either calling an undefined function, or by initializing a module that is missing styles or internationalization messages.

Assuming that code is written sane and clean and does not make assumptions, this will work fine. Because if the entire module and wherever it is a dependency for is not loaded, it means nothing will look broken (there may be features absent, but that should be fine). Sometimes this can cause unexpected problems if modules are intermixed without proper dependency declarations.

So back to where the failures are observable, they can be seen in two places:
 * Client side: the load.php will output the exception + stack trace in a block comment on top of the script or stylesheet (both in debug mode and in production mode). To check it out its best to use the debugger in your favorite browser (e.g. the Resources tab in the Chrome Developer Tools) to view the individual requests.
 * Server side: The php error should be logged somewhere depending on your php, apache and mediawiki configuration.