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

Unified Diff: pkg/analyzer/lib/src/generated/utilities_collection.dart

Issue 2326813002: Replace and remove JavaException(s). (Closed)
Patch Set: Created 4 years, 3 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/analyzer/lib/src/generated/utilities_collection.dart
diff --git a/pkg/analyzer/lib/src/generated/utilities_collection.dart b/pkg/analyzer/lib/src/generated/utilities_collection.dart
index a1f6cd635903a438cd70de0e494977e75b5583e3..cd395485f05dd8e098fe371c5014784fc903f71d 100644
--- a/pkg/analyzer/lib/src/generated/utilities_collection.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_collection.dart
@@ -203,7 +203,7 @@ class DirectedGraph<N> {
*/
List<N> findCycleContaining(N node) {
if (node == null) {
- throw new IllegalArgumentException();
+ throw new ArgumentError();
}
DirectedGraph_SccFinder<N> finder = new DirectedGraph_SccFinder<N>(this);
return finder.componentContaining(node);
@@ -570,7 +570,7 @@ class MultipleMapIterator<K, V> implements MapIterator<K, V> {
@override
K get key {
if (_currentIterator == null) {
- throw new NoSuchElementException();
+ throw new StateError('No element');
}
return _currentIterator.key;
}
@@ -578,7 +578,7 @@ class MultipleMapIterator<K, V> implements MapIterator<K, V> {
@override
V get value {
if (_currentIterator == null) {
- throw new NoSuchElementException();
+ throw new StateError('No element');
}
return _currentIterator.value;
}
@@ -586,7 +586,7 @@ class MultipleMapIterator<K, V> implements MapIterator<K, V> {
@override
void set value(V newValue) {
if (_currentIterator == null) {
- throw new NoSuchElementException();
+ throw new StateError('No element');
}
_currentIterator.value = newValue;
}
@@ -672,7 +672,7 @@ class SingleMapIterator<K, V> implements MapIterator<K, V> {
@override
K get key {
if (_currentKey == null) {
- throw new NoSuchElementException();
+ throw new StateError('No element');
}
return _currentKey;
}
@@ -680,7 +680,7 @@ class SingleMapIterator<K, V> implements MapIterator<K, V> {
@override
V get value {
if (_currentKey == null) {
- throw new NoSuchElementException();
+ throw new StateError('No element');
}
if (_currentValue == null) {
_currentValue = _map[_currentKey];
@@ -691,7 +691,7 @@ class SingleMapIterator<K, V> implements MapIterator<K, V> {
@override
void set value(V newValue) {
if (_currentKey == null) {
- throw new NoSuchElementException();
+ throw new StateError('No element');
}
_currentValue = newValue;
_map[_currentKey] = newValue;

Powered by Google App Engine
This is Rietveld 408576698