error checking
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 9 Dec 2005 21:22:09 +0000 (21:22 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 9 Dec 2005 21:22:09 +0000 (21:22 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2321 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/main/menu.js

index 285f537..80d78ad 100644 (file)
@@ -168,10 +168,14 @@ main.menu.prototype = {
                frame.setAttribute('src',url);
                panel.appendChild(frame);
                if (content_params) {
-                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                       this.error.sdump('D_MENU', 'frame.contentWindow = ' + frame.contentWindow + '\n');
-                       frame.contentWindow.IAMXUL = true;
-                       frame.contentWindow.xulG = content_params;
+                       try {
+                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+                               this.error.sdump('D_MENU', 'frame.contentWindow = ' + frame.contentWindow + '\n');
+                               frame.contentWindow.IAMXUL = true;
+                               frame.contentWindow.xulG = content_params;
+                       } catch(E) {
+                               this.error.sdump('D_ERROR', 'main.menu: ' + E);
+                       }
                }
                return frame;
        }