better handling of un-JSON-fiable objects
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 12 Jul 2005 14:19:31 +0000 (14:19 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 12 Jul 2005 14:19:31 +0000 (14:19 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1142 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS.js

index dcfede2..2de431c 100644 (file)
@@ -1,5 +1,5 @@
 function OpenILS_init(params) { 
-       sdump( 'D_TRACE', arg_dump( arguments, { '0':'js2JSON( map_object( arg, function (i,o) { if (i=="d"||i=="w") return [i,o.toString()]; else return [i,o]; }))' }));
+       sdump( 'D_TRACE', arg_dump( arguments, { '0':'js2JSON( map_object( arg,function(i,o){try{return [i,o.toString()];}catch(E){return [i,o];}}))' }));
 
        try {
 
@@ -29,7 +29,9 @@ function OpenILS_init(params) {
 }
 
 function OpenILS_exit(params) {
-       sdump( 'D_TRACE', arg_dump( arguments, { '0':'js2JSON( map_object( arg, function (i,o) { if (i=="d"||i=="w") return [i,o.toString()]; else return [i,o]; }))' }));
+       sdump( 'D_TRACE', arg_dump( arguments, { '0':'js2JSON( map_object( arg,function(i,o){try{return [i,o.toString()];}catch(E){return [i,o];}}))' }));
+       params.w.document.firstChild.setAttribute('style','background-color: red;');
+       return;
 
        try {