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

Unified Diff: runtime/bin/socket_patch.dart

Issue 11275042: Renaming IndexOutOfRangeException to RangeError. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regenerated html files. Created 8 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
« no previous file with comments | « pkg/unittest/test/matchers_test.dart ('k') | runtime/lib/array.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 65f4a8a13d2225b4e65e791a7cf6535258eb7bb8..2b22877fbd88a7f5e22da1194d3bd2d10c0bb812 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -395,13 +395,13 @@ class _Socket extends _SocketBase implements Socket {
return 0;
}
if (offset < 0) {
- throw new IndexOutOfRangeException(offset);
+ throw new RangeError.value(offset);
}
if (bytes < 0) {
- throw new IndexOutOfRangeException(bytes);
+ throw new RangeError.value(bytes);
}
if ((offset + bytes) > buffer.length) {
- throw new IndexOutOfRangeException(offset + bytes);
+ throw new RangeError.value(offset + bytes);
}
var result = _readList(buffer, offset, bytes);
if (result is OSError) {
@@ -426,13 +426,13 @@ class _Socket extends _SocketBase implements Socket {
return 0;
}
if (offset < 0) {
- throw new IndexOutOfRangeException(offset);
+ throw new RangeError.value(offset);
}
if (bytes < 0) {
- throw new IndexOutOfRangeException(bytes);
+ throw new RangeError.value(bytes);
}
if ((offset + bytes) > buffer.length) {
- throw new IndexOutOfRangeException(offset + bytes);
+ throw new RangeError.value(offset + bytes);
}
_BufferAndOffset bufferAndOffset =
_ensureFastAndSerializableBuffer(buffer, offset, bytes);
« no previous file with comments | « pkg/unittest/test/matchers_test.dart ('k') | runtime/lib/array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698