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

Unified Diff: runtime/lib/byte_array.dart

Issue 11235054: Removed IllegalAccessException and UnsupportedOperationException. (Closed) Base URL: https://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/lib/byte_array.dart
diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart
index 708e291d27f408bf8f0d6907ea0a893422e985db..8b741223a7713a3c83342bb879b5e1c4f6fadcc0 100644
--- a/runtime/lib/byte_array.dart
+++ b/runtime/lib/byte_array.dart
@@ -164,22 +164,22 @@ abstract class _ByteArrayBase {
// Methods implementing the List interface.
set length(newLength) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot resize a non-extendable array");
}
void add(value) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot add to a non-extendable array");
}
void addLast(value) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot add to a non-extendable array");
}
void addAll(Collection value) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot add to a non-extendable array");
}
@@ -197,12 +197,12 @@ abstract class _ByteArrayBase {
}
void clear() {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot remove from a non-extendable array");
}
int removeLast() {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot remove from a non-extendable array");
}
@@ -211,12 +211,12 @@ abstract class _ByteArrayBase {
}
void removeRange(int start, int length) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot remove from a non-extendable array");
}
void insertRange(int start, int length, [initialValue]) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot add to a non-extendable array");
}
@@ -1642,22 +1642,22 @@ class _ByteArrayViewBase {
// Methods implementing the List interface.
set length(newLength) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot resize a non-extendable array");
}
void add(value) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot add to a non-extendable array");
}
void addLast(value) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot add to a non-extendable array");
}
void addAll(Collection value) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot add to a non-extendable array");
}
@@ -1675,12 +1675,12 @@ class _ByteArrayViewBase {
}
void clear() {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot remove from a non-extendable array");
}
int removeLast() {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot remove from a non-extendable array");
}
@@ -1689,12 +1689,12 @@ class _ByteArrayViewBase {
}
void removeRange(int start, int length) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot remove from a non-extendable array");
}
void insertRange(int start, int length, [initialValue]) {
- throw const UnsupportedOperationException(
+ throw new StateError(
"Cannot add to a non-extendable array");
}
}

Powered by Google App Engine
This is Rietveld 408576698