diff options
author | Andrew Dolgov <[email protected]> | 2016-08-10 12:23:35 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2016-08-10 12:23:35 +0300 |
commit | 546b419f52a741c150874fd233d91b88e88fa71a (patch) | |
tree | c1e652a431e571b47a8d7bc5b661eef09eb9d2e5 /index.php | |
parent | f6d2787a8e139da6af412f87645402e0c193af01 (diff) |
catch plugin JS errors
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -118,7 +118,12 @@ foreach (PluginHost::getInstance()->get_plugins() as $n => $p) { if (method_exists($p, "get_js")) { + echo "try {"; echo JShrink\Minifier::minify($p->get_js()); + echo "} catch (e) { + console.warn('failed to initialize plugin JS: $n'); + console.warn(e); + }"; } } |