Chromium Code Reviews| Index: runtime/lib/immutable_map.dart |
| diff --git a/runtime/lib/immutable_map.dart b/runtime/lib/immutable_map.dart |
| index 3901c11a5279fb1e6d0a56deabc3cb069f397fa8..b9d4f93c4ef1966027cbf16ce179879a70ccf139 100644 |
| --- a/runtime/lib/immutable_map.dart |
| +++ b/runtime/lib/immutable_map.dart |
| @@ -72,19 +72,19 @@ class ImmutableMap<K, V> implements Map<K, V> { |
| } |
| void operator []=(K key, V value) { |
| - throw const IllegalAccessException(); |
| + throw new StateError("Cannot set value in unmodifiable Map"); |
|
floitsch
2012/10/23 12:50:32
why not const?
Lasse Reichstein Nielsen
2012/10/24 12:32:15
Why const. It's an exception case that should happ
|
| } |
| V putIfAbsent(K key, V ifAbsent()) { |
| - throw const IllegalAccessException(); |
| + throw new StateError("Cannot set value in unmodifiable Map"); |
| } |
| void clear() { |
| - throw const IllegalAccessException(); |
| + throw new StateError("Cannot clear unmodifiable Map"); |
| } |
| V remove(K key) { |
| - throw const IllegalAccessException(); |
| + throw new StateError("Cannot remove from unmodifiable Map"); |
| } |
| String toString() { |