Chromium Code Reviews| Index: sdk/lib/core/date_time.dart |
| diff --git a/sdk/lib/core/date_time.dart b/sdk/lib/core/date_time.dart |
| index 2e93ad1206e40994b84586f07463ebc14567624f..549e630b5aa9140ad89eae43cf5ebbce7be6cc05 100644 |
| --- a/sdk/lib/core/date_time.dart |
| +++ b/sdk/lib/core/date_time.dart |
| @@ -282,13 +282,13 @@ class DateTime implements Comparable { |
| int millisecondsSinceEpoch = _brokenDownDateToMillisecondsSinceEpoch( |
| years, month, day, hour, minute, second, millisecond, isUtc); |
| if (millisecondsSinceEpoch == null) { |
| - throw new FormatException(formattedString); |
| + throw new FormatException('Out of range: $formattedString'); |
|
Lasse Reichstein Nielsen
2014/08/04 07:25:47
Use:
new FormattedException("Date out of range",
srawlins
2014/08/04 19:58:30
Done.
|
| } |
| if (addOneMillisecond) millisecondsSinceEpoch++; |
| return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch, |
| isUtc: isUtc); |
| } else { |
| - throw new FormatException(formattedString); |
| + throw new FormatException('Could not parse: $formattedString'); |
|
Lasse Reichstein Nielsen
2014/08/04 07:25:47
throw new FormatException("Invalid DateTime format
srawlins
2014/08/04 19:58:30
Done.
|
| } |
| } |