extra info in debug, added space to casting string
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 20 Apr 2005 20:41:13 +0000 (20:41 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 20 Apr 2005 20:41:13 +0000 (20:41 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@283 9efc2488-bf62-4759-914b-345cdb29e865

src/javascript/JSON.js

index 3e4e13f..a3ece9e 100644 (file)
@@ -23,7 +23,7 @@ function JSON2js (json) {
                try {
                        eval( 'obj = ' + json );
                } catch(E) {
-                       debug("Error building JSON object with string " + json );
+                       debug("Error building JSON object with string " + E + "\nString:\n" + json );
                        return null;
                }
        }
@@ -40,7 +40,7 @@ function js2JSON(arg) {
                        if(arg) {
 
                                if (arg._isfieldmapper) { /* magi-c-ast for fieldmapper objects */
-                                       return "/*--S " + arg.classname + "--*/" + js2JSON(arg.array) + "/*--E " + arg.classname + "--*/";
+                                       return "/*--S " + arg.classname + " --*/" + js2JSON(arg.array) + "/*--E " + arg.classname + " --*/";
 
                                } else {