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

Unified Diff: lib/coreimpl/date.dart

Issue 10989013: Change IllegalArgumentException to ArgumentError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated co19 test expectations. Created 8 years, 3 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
Index: lib/coreimpl/date.dart
diff --git a/lib/coreimpl/date.dart b/lib/coreimpl/date.dart
index f8660297627ddf1cbe6d51a03447b95446e6e8f4..2138ba5e174803db7d532729cbf17731efb1dbc7 100644
--- a/lib/coreimpl/date.dart
+++ b/lib/coreimpl/date.dart
@@ -50,12 +50,12 @@ class DateImplementation implements Date {
int millisecondsSinceEpoch = _brokenDownDateToMillisecondsSinceEpoch(
years, month, day, hour, minute, second, millisecond, isUtc);
if (millisecondsSinceEpoch === null) {
- throw new IllegalArgumentException(formattedString);
+ throw new ArgumentError(formattedString);
}
if (addOneMillisecond) millisecondsSinceEpoch++;
return new Date.fromMillisecondsSinceEpoch(millisecondsSinceEpoch, isUtc);
} else {
- throw new IllegalArgumentException(formattedString);
+ throw new ArgumentError(formattedString);
}
}
@@ -64,9 +64,9 @@ class DateImplementation implements Date {
DateImplementation.fromMillisecondsSinceEpoch(this.millisecondsSinceEpoch,
this.isUtc) {
if (millisecondsSinceEpoch.abs() > _MAX_MILLISECONDS_SINCE_EPOCH) {
- throw new IllegalArgumentException(millisecondsSinceEpoch);
+ throw new ArgumentError(millisecondsSinceEpoch);
}
- if (isUtc === null) throw new IllegalArgumentException(isUtc);
+ if (isUtc === null) throw new ArgumentError(isUtc);
}
bool operator ==(other) {

Powered by Google App Engine
This is Rietveld 408576698