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

Unified Diff: sdk/lib/convert/ascii.dart

Issue 711003002: Add some ArgumentError and RangeError constructors that capture more information. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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: sdk/lib/convert/ascii.dart
diff --git a/sdk/lib/convert/ascii.dart b/sdk/lib/convert/ascii.dart
index 281233a57155200ffa1ed854f323772d63ac6190..40ff5a8fdc14f87afd028987d67d6cfa5fc4c816 100644
--- a/sdk/lib/convert/ascii.dart
+++ b/sdk/lib/convert/ascii.dart
@@ -292,10 +292,10 @@ class _SimpleAsciiDecoderSink extends ByteConversionSinkBase {
void addSlice(List<int> source, int start, int end, bool isLast) {
final int length = source.length;
if (start < 0 || start > length) {
- throw new RangeError.range(start, 0, length - 1);
+ throw new RangeError.range(start, 0, length);
}
if (end < start || end > length) {
- throw new RangeError.range(end, start, length - 1);
+ throw new RangeError.range(end, start, length);
}
if (start < end) {
if (start != 0 || end != length) {

Powered by Google App Engine
This is Rietveld 408576698