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

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

Issue 114193010: Show the dependender(s) for missing packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years 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: sdk/lib/_internal/pub/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index 222941ad9f2d012f285f614f0ab82004d85a3d6a..66d12204a84485377745d39d4112fc4d59d8e77b 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -804,6 +804,16 @@ class ApplicationException implements Exception {
String toString() => message;
}
+/// An class for exceptions where a package could not be found in a [Source].
+///
+/// The source is responsible for wrapping its internal exceptions in this so
+/// that other code in pub can use this to show a more detailed explanation of
+/// why the package was being requested.
+class PackageNotFoundException extends ApplicationException {
+ PackageNotFoundException(String message, [innerError, StackTrace innerTrace])
+ : super(message, innerError, innerTrace);
+}
+
/// Throw a [ApplicationException] with [message].
void fail(String message, [innerError, StackTrace innerTrace]) {
throw new ApplicationException(message, innerError, innerTrace);
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/source/path.dart ('k') | sdk/lib/_internal/pub/test/build/with_no_web_directory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698