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

Unified Diff: lib/html/templates/immutable_list_mixin.darttemplate

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: lib/html/templates/immutable_list_mixin.darttemplate
diff --git a/lib/html/templates/immutable_list_mixin.darttemplate b/lib/html/templates/immutable_list_mixin.darttemplate
index d72fc5d1f84179d2eaeb58666f8b292f17a23cef..67a5bd805bbed06e716c4da1f5f9861eb5bd4dfa 100644
--- a/lib/html/templates/immutable_list_mixin.darttemplate
+++ b/lib/html/templates/immutable_list_mixin.darttemplate
@@ -13,15 +13,15 @@
// From Collection<$E>:
void add($E value) {
- throw const UnsupportedOperationException("Cannot add to immutable List.");
+ throw new StateError("Cannot add to immutable List.");
}
void addLast($E value) {
- throw const UnsupportedOperationException("Cannot add to immutable List.");
+ throw new StateError("Cannot add to immutable List.");
}
void addAll(Collection<$E> collection) {
- throw const UnsupportedOperationException("Cannot add to immutable List.");
+ throw new StateError("Cannot add to immutable List.");
}
$if DEFINE_CONTAINS
@@ -46,7 +46,7 @@ $endif
// From List<$E>:
void sort([Comparator<$E> compare = Comparable.compare]) {
- throw const UnsupportedOperationException("Cannot sort immutable List.");
+ throw new StateError("Cannot sort immutable List.");
}
int indexOf($E element, [int start = 0]) =>
@@ -60,19 +60,19 @@ $endif
$E last() => this[length - 1];
$E removeLast() {
- throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
+ throw new StateError("Cannot removeLast on immutable List.");
}
void setRange(int start, int rangeLength, List<$E> from, [int startFrom]) {
- throw const UnsupportedOperationException("Cannot setRange on immutable List.");
+ throw new StateError("Cannot setRange on immutable List.");
}
void removeRange(int start, int rangeLength) {
- throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
+ throw new StateError("Cannot removeRange on immutable List.");
}
void insertRange(int start, int rangeLength, [$E initialValue]) {
- throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
+ throw new StateError("Cannot insertRange on immutable List.");
}
List<$E> getRange(int start, int rangeLength) =>

Powered by Google App Engine
This is Rietveld 408576698