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

Unified Diff: pkg/dartdoc/lib/src/mirrors/util.dart

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: 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;

Powered by Google App Engine
This is Rietveld 408576698