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

Unified Diff: lib/compiler/implementation/lib/js_helper.dart

Issue 10850034: Rename BadNumberFormatException -> FormatException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 8 years, 4 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 | « lib/compiler/implementation/lib/interceptors.dart ('k') | lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/lib/js_helper.dart
diff --git a/lib/compiler/implementation/lib/js_helper.dart b/lib/compiler/implementation/lib/js_helper.dart
index afd34a9022e7b516ea255f10e5e7330e92e62f3e..05805412ce592b67d0b9792754d669d9d9fe689f 100644
--- a/lib/compiler/implementation/lib/js_helper.dart
+++ b/lib/compiler/implementation/lib/js_helper.dart
@@ -672,7 +672,7 @@ class MathNatives {
if (!JS('bool',
@'/^\s*[+-]?(?:0[xX][abcdefABCDEF0-9]+|\d+)\s*$/.test(#)',
str)) {
- throw new BadNumberFormatException(str);
+ throw new FormatException(str);
}
var trimmed = str.trim();
var base = 10;;
@@ -681,7 +681,7 @@ class MathNatives {
base = 16;
}
var ret = JS('num', @'parseInt(#, #)', trimmed, base);
- if (ret.isNaN()) throw new BadNumberFormatException(str);
+ if (ret.isNaN()) throw new FormatException(str);
return ret;
}
@@ -693,7 +693,7 @@ class MathNatives {
ret = JS('num', @'parseInt(#)', str);
}
if (ret.isNaN() && str != 'NaN' && str != '-NaN') {
- throw new BadNumberFormatException(str);
+ throw new FormatException(str);
}
return ret;
}
« no previous file with comments | « lib/compiler/implementation/lib/interceptors.dart ('k') | lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698