Better error message for broken JSON

pull/557/head
Egil Moeller 2012-03-21 19:29:59 +01:00
parent 50474dff1f
commit d21cc1912c
1 changed files with 1 additions and 1 deletions

View File

@ -465,7 +465,7 @@ if (!JSON)
} }
// If the text is not JSON parseable, then a SyntaxError is thrown. // If the text is not JSON parseable, then a SyntaxError is thrown.
throw new SyntaxError('JSON.parse'); throw new SyntaxError('JSON.parse: ' + text);
}; };
} }
}()); }());