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) => |