Index: utils/pub/hosted_source.dart |
diff --git a/utils/pub/hosted_source.dart b/utils/pub/hosted_source.dart |
index 5a4106e29cac657b57ea2dafe8abcf349f93223c..bd017e667a61f48e912f40600dcbede85071d10a 100644 |
--- a/utils/pub/hosted_source.dart |
+++ b/utils/pub/hosted_source.dart |
@@ -133,16 +133,16 @@ class HostedSource extends Source { |
void _throwFriendlyError(error, package, url) { |
if (error is PubHttpException && |
error.response.statusCode == 404) { |
- throw 'Could not find package "$package" at $url.'; |
+ fail('Could not find package "$package" at $url.'); |
} |
if (error is TimeoutException) { |
- throw 'Timed out trying to find package "$package" at $url.'; |
+ fail('Timed out trying to find package "$package" at $url.'); |
} |
if (error is io.SocketIOException) { |
- throw 'Got socket error trying to find package "$package" at $url.\n' |
- '${error.osError}'; |
+ fail('Got socket error trying to find package "$package" at $url.\n' |
+ '${error.osError}'); |
} |
// Otherwise re-throw the original exception. |