Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Add some ArgumentError and RangeError constructors that capture more …
Browse files Browse the repository at this point in the history
…information.

Switch some uses of RangeError.range to RangeError.index.
Fix bug in Queue where elementAt allowed `length` as input.

[email protected]

Review URL: https://codereview.chromium.org//711003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/typed_data@41653 260f80e4-7a28-3924-810f-c04153c831b5
  • Loading branch information
lrhn committed Nov 11, 2014
1 parent 79999b8 commit 8eaaabb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/typed_buffers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ abstract class _TypedDataBuffer<E> extends ListBase<E> {

int get length => _length;
E operator[](int index) {
if (index >= length) throw new RangeError.range(index, 0, length - 1);
if (index >= length) throw new RangeError.index(index, this);
return _buffer[index];
}

void operator[]=(int index, E value) {
if (index >= length) throw new RangeError.range(index, 0, length - 1);
if (index >= length) throw new RangeError.index(index, this);
_buffer[index] = value;
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: typed_data
version: 1.0.0
version: 1.0.1-dev
author: Dart Team <[email protected]>
description: Utility functions and classes related to the 'dart:typed_data' library.
homepage: http://www.dartlang.org
Expand Down

0 comments on commit 8eaaabb

Please sign in to comment.