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

Unified Diff: sdk/lib/_internal/pub/lib/src/path_source.dart

Issue 14662003: Don't show a stack trace on a bad path dependency path. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/test/install/path/nonexistent_dir_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/path_source.dart
diff --git a/sdk/lib/_internal/pub/lib/src/path_source.dart b/sdk/lib/_internal/pub/lib/src/path_source.dart
index 72d406599743bb41cf8b6eff1f520f71541c11f8..7d6393598c1ea5f7d4e5e3eaf0baf39dfe4a0695 100644
--- a/sdk/lib/_internal/pub/lib/src/path_source.dart
+++ b/sdk/lib/_internal/pub/lib/src/path_source.dart
@@ -110,18 +110,17 @@ class PathSource extends Source {
/// Ensures that [description] is a valid path description. It must be a map,
/// with a "path" key containing a path that points to an existing directory.
- /// Throws a [FormatException] if the path is invalid.
+ /// Throws an [ApplicationException] if the path is invalid.
void _validatePath(String name, description) {
var dir = description["path"];
if (dirExists(dir)) return;
if (fileExists(dir)) {
- throw new FormatException(
- "Path dependency for package '$name' must refer to a "
- "directory, not a file. Was '$dir'.");
+ fail("Path dependency for package '$name' must refer to a "
+ "directory, not a file. Was '$dir'.");
}
- throw new FormatException("Could not find package '$name' at '$dir'.");
+ fail("Could not find package '$name' at '$dir'.");
}
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/test/install/path/nonexistent_dir_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698