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

Unified Diff: runtime/lib/array.dart

Issue 11235054: Removed IllegalAccessException and UnsupportedOperationException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ADded test expectations. 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
« no previous file with comments | « runtime/bin/process.dart ('k') | runtime/lib/byte_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.dart
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index 135eaf2d2bbf2869927c8ca7dc4cb1ea20a11d71..498ffd8cef30a1696e01f3043d9f47aa2fd05089 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -25,7 +25,7 @@ class _ObjectArray<E> implements List<E> {
native "ObjectArray_copyFromObjectArray";
E removeAt(int index) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot remove element of a non-extendable array");
}
@@ -41,12 +41,12 @@ class _ObjectArray<E> implements List<E> {
}
void removeRange(int start, int length) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot remove range of a non-extendable array");
}
void insertRange(int start, int length, [E initialValue = null]) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot insert range in a non-extendable array");
}
@@ -110,7 +110,7 @@ class _ObjectArray<E> implements List<E> {
}
void add(E element) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot add to a non-extendable array");
}
@@ -119,22 +119,22 @@ class _ObjectArray<E> implements List<E> {
}
void addAll(Collection<E> elements) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot add to a non-extendable array");
}
void clear() {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot clear a non-extendable array");
}
void set length(int length) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot change the length of a non-extendable array");
}
E removeLast() {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot remove in a non-extendable array");
}
@@ -154,41 +154,41 @@ class _ObjectArray<E> implements List<E> {
class _ImmutableArray<E> implements List<E> {
factory _ImmutableArray._uninstantiable() {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"ImmutableArray can only be allocated by the VM");
}
E operator [](int index) native "ObjectArray_getIndexed";
void operator []=(int index, E value) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot modify an immutable array");
}
int get length native "ObjectArray_getLength";
E removeAt(int index) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot modify an immutable array");
}
void copyFrom(List src, int srcStart, int dstStart, int count) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot modify an immutable array");
}
void setRange(int start, int length, List<E> from, [int startFrom = 0]) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot modify an immutable array");
}
void removeRange(int start, int length) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot remove range of an immutable array");
}
void insertRange(int start, int length, [E initialValue = null]) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot insert range in an immutable array");
}
@@ -235,7 +235,7 @@ class _ImmutableArray<E> implements List<E> {
}
void sort([Comparator<E> compare]) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot modify an immutable array");
}
@@ -257,7 +257,7 @@ class _ImmutableArray<E> implements List<E> {
}
void add(E element) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot add to an immutable array");
}
@@ -266,22 +266,22 @@ class _ImmutableArray<E> implements List<E> {
}
void addAll(Collection<E> elements) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot add to an immutable array");
}
void clear() {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot clear an immutable array");
}
void set length(int length) {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot change the length of an immutable array");
}
E removeLast() {
- throw const UnsupportedOperationException(
+ throw new UnsupportedError(
"Cannot remove in a non-extendable array");
}
« no previous file with comments | « runtime/bin/process.dart ('k') | runtime/lib/byte_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698