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 b28feebb1ff2467ef4900a5a08fdd81e0eb20e11..f8395050be92e967125cd324d86ab51e8f529945 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 UnsupportedError("Cannot add to immutable List."); |
} |
void addLast($E value) { |
- throw const UnsupportedOperationException("Cannot add to immutable List."); |
+ throw new UnsupportedError("Cannot add to immutable List."); |
} |
void addAll(Collection<$E> collection) { |
- throw const UnsupportedOperationException("Cannot add to immutable List."); |
+ throw new UnsupportedError("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 UnsupportedError("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 UnsupportedError("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 UnsupportedError("Cannot setRange on immutable List."); |
} |
void removeRange(int start, int rangeLength) { |
- throw const UnsupportedOperationException("Cannot removeRange on immutable List."); |
+ throw new UnsupportedError("Cannot removeRange on immutable List."); |
} |
void insertRange(int start, int rangeLength, [$E initialValue]) { |
- throw const UnsupportedOperationException("Cannot insertRange on immutable List."); |
+ throw new UnsupportedError("Cannot insertRange on immutable List."); |
} |
List<$E> getRange(int start, int rangeLength) => |