Commit 7be4e421 authored by Eric Seidel's avatar Eric Seidel

Add more logging for the NetworkService unavailable case

TBR=abarth@google.com
parent 6aa8e4bb
...@@ -40,6 +40,7 @@ Future<UrlResponse> fetch(UrlRequest request) async { ...@@ -40,6 +40,7 @@ Future<UrlResponse> fetch(UrlRequest request) async {
loader.close(); loader.close();
return response; return response;
} catch (e) { } catch (e) {
print("NetworkService unavailable $e");
return new UrlResponse()..statusCode = 500; return new UrlResponse()..statusCode = 500;
} }
} }
......
...@@ -17,7 +17,7 @@ Future<sky.Image> load(String url) { ...@@ -17,7 +17,7 @@ Future<sky.Image> load(String url) {
Completer<sky.Image> completer = new Completer<sky.Image>(); Completer<sky.Image> completer = new Completer<sky.Image>();
fetchUrl(url).then((UrlResponse response) { fetchUrl(url).then((UrlResponse response) {
if (response.statusCode >= 400) { if (response.statusCode >= 400) {
print("Failed to load image ${url}"); print("Failed (${response.statusCode}) to load image ${url}");
completer.complete(null); completer.complete(null);
} else { } else {
new sky.ImageDecoder(response.body.handle.h, completer.complete); new sky.ImageDecoder(response.body.handle.h, completer.complete);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment