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

Unified Diff: runtime/bin/socket_impl.dart

Issue 11275042: Renaming IndexOutOfRangeException to RangeError. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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: runtime/bin/socket_impl.dart
diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
index b262cee9d14e1df00f875efca48f051d0ebc9275..9a9e571b25e6e8cda3a8cb38f971f7a53a45a272 100644
--- a/runtime/bin/socket_impl.dart
+++ b/runtime/bin/socket_impl.dart
@@ -369,13 +369,13 @@ class _Socket extends _SocketBase implements Socket {
return 0;
}
if (offset < 0) {
- throw new IndexOutOfRangeException(offset);
+ throw new RangeError(offset);
}
if (bytes < 0) {
- throw new IndexOutOfRangeException(bytes);
+ throw new RangeError(bytes);
}
if ((offset + bytes) > buffer.length) {
- throw new IndexOutOfRangeException(offset + bytes);
+ throw new RangeError(offset + bytes);
}
var result = _readList(buffer, offset, bytes);
if (result is OSError) {
@@ -400,13 +400,13 @@ class _Socket extends _SocketBase implements Socket {
return 0;
}
if (offset < 0) {
- throw new IndexOutOfRangeException(offset);
+ throw new RangeError(offset);
}
if (bytes < 0) {
- throw new IndexOutOfRangeException(bytes);
+ throw new RangeError(bytes);
}
if ((offset + bytes) > buffer.length) {
- throw new IndexOutOfRangeException(offset + bytes);
+ throw new RangeError(offset + bytes);
}
_BufferAndOffset bufferAndOffset =
_ensureFastAndSerializableBuffer(buffer, offset, bytes);

Powered by Google App Engine
This is Rietveld 408576698