Make sure the exception has some level of parity with the error from json2.js.
authorjeresig <jeresig@gmail.com>
Thu, 7 Jan 2010 17:25:50 +0000 (12:25 -0500)
committerjeresig <jeresig@gmail.com>
Thu, 7 Jan 2010 17:25:50 +0000 (12:25 -0500)
src/ajax.js

index 4ba4548..73e1db6 100644 (file)
@@ -584,7 +584,7 @@ jQuery.extend({
                                                data = (new Function("return " + data))();
 
                                } else {
-                                       throw "JSON Syntax Error: " + data;
+                                       throw "JSON.parse";
                                }
 
                        // If the type is "script", eval it in global context