]> git.wh0rd.org Git - tt-rss.git/commitdiff
infobox_callback: add exception handler
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 14 Jun 2007 06:34:35 +0000 (07:34 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 14 Jun 2007 06:34:35 +0000 (07:34 +0100)
functions.js

index 7b7253d9f8529422d78ff96bc516b3583e051066..89e3c26190b63997359666bd12685275a9ce0fbb 100644 (file)
@@ -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("");
        }
 }