debugging
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Jul 2006 21:59:18 +0000 (21:59 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Jul 2006 21:59:18 +0000 (21:59 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4987 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js

index bd783b5..e2ac577 100644 (file)
@@ -40,7 +40,9 @@ OpenILS.data.prototype = {
                        const OpenILS=new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
                        var data_cache=new OpenILS( );
                        for (var i = 0; i < arguments.length; i++) {
-                               this.error.sdump('D_DATA','stashing ' + arguments[i] + ' : ' + this[arguments[i]] + '\n');
+                               try {
+                                       if (arguments[i] != 'hash' && arguments[i] != 'list') this.error.sdump('D_DATA_STASH','stashing ' + arguments[i] + ' : ' + this[arguments[i]] + (typeof this[arguments[i]] == 'object' ? ' = ' + js2JSON(this[arguments[i]]) : '') + '\n');
+                               } catch(F) { alert(F); }
                                data_cache.wrappedJSObject.OpenILS.prototype.data[arguments[i]] = this[arguments[i]];
                        }
                } catch(E) {
@@ -83,7 +85,7 @@ OpenILS.data.prototype = {
                        var data_cache=new OpenILS( );
                        var dc = data_cache.wrappedJSObject.OpenILS.prototype.data;
                        for (var i in dc) {
-                               this.error.sdump('D_DATA','Retrieving ' + i + ' : ' + dc[i] + '\n');
+                               this.error.sdump('D_DATA_RETRIEVE','Retrieving ' + i + ' : ' + dc[i] + '\n');
                                this[i] = dc[i];
                        }
                        if (typeof this.on_complete == 'function') {