From 3c2c2a5bf81d9ccfe6d400fd4e42ad76449dc305 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 13 Sep 2010 02:04:24 +0000 Subject: [PATCH] wrap custom props file reader in try/catch to prevent xhr complaining about missing file git-svn-id: svn://svn.open-ils.org/ILS/trunk@17622 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/chrome/content/main/bindings.xml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml b/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml index d17f839c1..f16d773a3 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml +++ b/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml @@ -189,16 +189,19 @@ alert(msg); throw(msg); } - var custom_src = String(this.src).replace('.','_custom.'); - var x2 = new XMLHttpRequest(); - x2.open("GET",custom_src,false); - x2.send(null); - if (x2.responseText) { - var props = this._props2object(x2.responseText); - for (var i in props) { - this._props[i] = props[i]; + try { // fail silently if no custom properties file exists + var custom_src = String(this.src).replace('.','_custom.'); + var x2 = new XMLHttpRequest(); + x2.open("GET",custom_src,false); + x2.send(null); + if (x2.responseText) { + var props = this._props2object(x2.responseText); + for (var i in props) { + this._props[i] = props[i]; + } } - } + } catch(EE) {} + } catch(E) { alert('Error loading properties in messagecatalog in bindings.xml: ' + E); throw(E); -- 2.11.0