Stop working around issue 6775.
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//23093023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26664 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/lib/src/credentials.dart b/lib/src/credentials.dart
index b02f470..5bbec16 100644
--- a/lib/src/credentials.dart
+++ b/lib/src/credentials.dart
@@ -81,8 +81,7 @@
var parsed;
try {
parsed = JSON.parse(json);
- } catch (e) {
- // TODO(nweiz): narrow this catch clause once issue 6775 is fixed.
+ } on FormatException catch (e) {
validate(false, 'invalid JSON');
}
diff --git a/lib/src/handle_access_token_response.dart b/lib/src/handle_access_token_response.dart
index 5e5f6e2..c14b8d1 100644
--- a/lib/src/handle_access_token_response.dart
+++ b/lib/src/handle_access_token_response.dart
@@ -40,8 +40,7 @@
var parameters;
try {
parameters = JSON.parse(response.body);
- } catch (e) {
- // TODO(nweiz): narrow this catch clause once issue 6775 is fixed.
+ } on FormatException catch (e) {
validate(false, 'invalid JSON');
}
@@ -110,8 +109,7 @@
var parameters;
try {
parameters = JSON.parse(response.body);
- } catch (e) {
- // TODO(nweiz): narrow this catch clause once issue 6775 is fixed.
+ } on FormatException catch (e) {
validate(false, 'invalid JSON');
}