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

Unified Diff: pkg/analyzer/lib/src/context/context.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/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 5e42099fac4b86a3fc231cb1a6da8e7de2224c00..3dfa30c564a77e4192cd85839edcea89300661fb 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -473,7 +473,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
if (identical(_sourceFactory, factory)) {
return;
} else if (factory.context != null) {
- throw new IllegalStateException(
+ throw new StateError(
"Source factories cannot be shared between contexts");
}
if (_sourceFactory != null) {
@@ -2307,7 +2307,7 @@ class SdkAnalysisContext extends AnalysisContextImpl {
}
DartSdk sdk = factory.dartSdk;
if (sdk == null) {
- throw new IllegalArgumentException(
+ throw new ArgumentError(
"The source factory for an SDK analysis context must have a DartUriResolver");
}
return new AnalysisCache(

Powered by Google App Engine
This is Rietveld 408576698