From: Andrew Dolgov Date: Thu, 14 Jun 2007 06:34:35 +0000 (+0100) Subject: infobox_callback: add exception handler X-Git-Tag: 1.2.12~5 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=aa8716da38a92a73799c5668bf0c51656af49646;p=tt-rss.git infobox_callback: add exception handler --- diff --git a/functions.js b/functions.js index 7b7253d9..89e3c261 100644 --- a/functions.js +++ b/functions.js @@ -1396,24 +1396,29 @@ function infobox_submit_callback() { function infobox_callback() { if (xmlhttp.readyState == 4) { - if (!is_msie() && !getInitParam("infobox_disable_overlay")) { - var overlay = document.getElementById("dialog_overlay"); - if (overlay) { - overlay.style.display = "block"; - } - } + try { - var box = document.getElementById('infoBox'); - var shadow = document.getElementById('infoBoxShadow'); - if (box) { - box.innerHTML=xmlhttp.responseText; - if (shadow) { - shadow.style.display = "block"; - } else { - box.style.display = "block"; + if (!is_msie() && !getInitParam("infobox_disable_overlay")) { + var overlay = document.getElementById("dialog_overlay"); + if (overlay) { + overlay.style.display = "block"; + } + } + + var box = document.getElementById('infoBox'); + var shadow = document.getElementById('infoBoxShadow'); + if (box) { + box.innerHTML=xmlhttp.responseText; + if (shadow) { + shadow.style.display = "block"; + } else { + box.style.display = "block"; + } } + notify(""); + } catch (e) { + exception_error("infobox_callback", e); } - notify(""); } }