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

Unified Diff: pkg/analyzer/lib/src/dart/resolver/scope.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/dart/resolver/scope.dart
diff --git a/pkg/analyzer/lib/src/dart/resolver/scope.dart b/pkg/analyzer/lib/src/dart/resolver/scope.dart
index 1272732604d93ef8d02188c1413e0a0ab2d7bf20..dbe05b17a3cef7fb527cab003e646ee9c192a885 100644
--- a/pkg/analyzer/lib/src/dart/resolver/scope.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/scope.dart
@@ -25,7 +25,7 @@ class BlockScope extends EnclosedScope {
*/
BlockScope(Scope enclosingScope, Block block) : super(enclosingScope) {
if (block == null) {
- throw new IllegalArgumentException("block cannot be null");
+ throw new ArgumentError("block cannot be null");
}
_defineElements(block);
}
@@ -69,7 +69,7 @@ class ClassScope extends EnclosedScope {
ClassScope(Scope enclosingScope, ClassElement classElement)
: super(enclosingScope) {
if (classElement == null) {
- throw new IllegalArgumentException("class element cannot be null");
+ throw new ArgumentError("class element cannot be null");
}
_defineMembers(classElement);
}
@@ -173,7 +173,7 @@ class FunctionScope extends EnclosedScope {
FunctionScope(Scope enclosingScope, this._functionElement)
: super(new EnclosedScope(new EnclosedScope(enclosingScope))) {
if (_functionElement == null) {
- throw new IllegalArgumentException("function element cannot be null");
+ throw new ArgumentError("function element cannot be null");
}
_defineTypeParameters();
}
@@ -1154,7 +1154,7 @@ class TypeParameterScope extends EnclosedScope {
TypeParameterScope(Scope enclosingScope, ClassElement classElement)
: super(enclosingScope) {
if (classElement == null) {
- throw new IllegalArgumentException("class element cannot be null");
+ throw new ArgumentError("class element cannot be null");
}
_defineTypeParameters(classElement);
}

Powered by Google App Engine
This is Rietveld 408576698