Index: pkg/dartdoc/lib/src/mirrors/util.dart |
diff --git a/pkg/dartdoc/lib/src/mirrors/util.dart b/pkg/dartdoc/lib/src/mirrors/util.dart |
index 760b9d288fea7ca0e48db8375775097242c91417..e32bcce064d660540b20970c1f1ed2135710e456 100644 |
--- a/pkg/dartdoc/lib/src/mirrors/util.dart |
+++ b/pkg/dartdoc/lib/src/mirrors/util.dart |
@@ -18,11 +18,11 @@ abstract class AbstractMap<K,V> implements Map<K,V> { |
} |
void operator []=(K key, value) { |
- throw new UnsupportedOperationException('[]= is not supported'); |
+ throw new StateError('[]= is not supported'); |
} |
void clear() { |
- throw new UnsupportedOperationException('clear() is not supported'); |
+ throw new StateError('clear() is not supported'); |
} |
bool containsKey(K key) { |
@@ -68,13 +68,13 @@ abstract class AbstractMap<K,V> implements Map<K,V> { |
} |
V remove(K key) { |
- throw new UnsupportedOperationException('V remove(K key) is not supported'); |
+ throw new StateError('V remove(K key) is not supported'); |
} |
} |
/** |
* [ImmutableMapWrapper] wraps a (mutable) map as an immutable map where all |
- * mutating operations throw [UnsupportedOperationException] upon invocation. |
+ * mutating operations throw [StateError] upon invocation. |
*/ |
class ImmutableMapWrapper<K,V> extends AbstractMap<K,V> { |
final Map<K,V> _map; |