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

Unified Diff: pkg/analyzer/lib/src/generated/source_io.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/source_io.dart
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index dbdef6f1c9a421be281c53706ae4241945e1894b..f6af841a4bbf9b3ce95eb843e84996a2440fe4d5 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -376,7 +376,7 @@ class PackageUriResolver extends UriResolver {
*/
PackageUriResolver(this._packagesDirectories) {
if (_packagesDirectories.length < 1) {
- throw new IllegalArgumentException(
+ throw new ArgumentError(
"At least one package directory must be provided");
}
}
@@ -407,7 +407,7 @@ class PackageUriResolver extends UriResolver {
JavaFile pkgDir = new JavaFile.relative(packagesDirectory, pkgName);
try {
pkgDir = pkgDir.getCanonicalFile();
- } on JavaIOException catch (exception, stackTrace) {
+ } catch (exception, stackTrace) {
if (!exception.toString().contains("Required key not available")) {
AnalysisEngine.instance.logger.logError("Canonical failed: $pkgDir",
new CaughtException(exception, stackTrace));

Powered by Google App Engine
This is Rietveld 408576698