summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2016-08-10 12:23:35 +0300
committerAndrew Dolgov <[email protected]>2016-08-10 12:23:35 +0300
commit546b419f52a741c150874fd233d91b88e88fa71a (patch)
treec1e652a431e571b47a8d7bc5b661eef09eb9d2e5 /index.php
parentf6d2787a8e139da6af412f87645402e0c193af01 (diff)
catch plugin JS errors
Diffstat (limited to 'index.php')
-rw-r--r--index.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.php b/index.php
index 36734619f..6b27d9042 100644
--- a/index.php
+++ b/index.php
@@ -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);
+ }";
}
}