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

Unified Diff: pkg/fixnum/lib/src/int64.dart

Issue 21155004: Clean up exceptions thrown in pkg/fixnum. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to pick up fixnum class renames. Created 7 years, 5 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 | « pkg/fixnum/lib/src/int32.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fixnum/lib/src/int64.dart
diff --git a/pkg/fixnum/lib/src/int64.dart b/pkg/fixnum/lib/src/int64.dart
index 0feafe43a0f5b8a55a43f3289e8e525cc282eb0c..1a9d73a71bd0524da5fde22536144cba1c70c59c 100644
--- a/pkg/fixnum/lib/src/int64.dart
+++ b/pkg/fixnum/lib/src/int64.dart
@@ -120,7 +120,7 @@ class Int64 implements IntX {
// TODO(rice) - make this faster by converting several digits at once.
static Int64 parseRadix(String s, int radix) {
if ((radix <= 1) || (radix > 16)) {
- throw "Bad radix: $radix";
+ throw new ArgumentError("Bad radix: $radix");
}
Int64 x = ZERO;
int i = 0;
@@ -421,7 +421,7 @@ class Int64 implements IntX {
Int64 operator <<(int n) {
if (n < 0) {
- throw new ArgumentError("$n");
+ throw new ArgumentError(n);
}
n &= 63;
@@ -445,7 +445,7 @@ class Int64 implements IntX {
Int64 operator >>(int n) {
if (n < 0) {
- throw new ArgumentError("$n");
+ throw new ArgumentError(n);
}
n &= 63;
@@ -486,7 +486,7 @@ class Int64 implements IntX {
Int64 shiftRightUnsigned(int n) {
if (n < 0) {
- throw new ArgumentError("$n");
+ throw new ArgumentError(n);
}
n &= 63;
@@ -725,7 +725,7 @@ class Int64 implements IntX {
String toRadixString(int radix) {
if ((radix <= 1) || (radix > 16)) {
- throw "Bad radix: $radix";
+ throw new ArgumentError("Bad radix: $radix");
}
Int64 a = this;
if (a.isZero) {
« no previous file with comments | « pkg/fixnum/lib/src/int32.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698