Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: lib/json/json.dart

Issue 10252002: Revert to throwing strings in JSON parsing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/json/json.dart
diff --git a/lib/json/json.dart b/lib/json/json.dart
index 523d3cdc2d572cb00fbae5b86b5b06f777a6d02e..9448b58707981651b957ed31af89abb38065ea02 100644
--- a/lib/json/json.dart
+++ b/lib/json/json.dart
@@ -27,6 +27,7 @@ class JSON {
//// Implementation ///////////////////////////////////////////////////////////
+// TODO(ajohnsen): Introduce when we have a common exception interface for json.
class JSONParseException {
JSONParseException(int position, String message) :
position = position,
@@ -349,7 +350,7 @@ class _JsonParser {
}
void _error(String message) {
- throw new JSONParseException(position, message);
+ throw message;
}
final String json;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698