Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
7be4e421
Commit
7be4e421
authored
Jul 29, 2015
by
Eric Seidel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more logging for the NetworkService unavailable case
TBR=abarth@google.com
parent
6aa8e4bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
fetch.dart
packages/flutter/lib/mojo/net/fetch.dart
+1
-0
image_cache.dart
packages/flutter/lib/mojo/net/image_cache.dart
+1
-1
No files found.
packages/flutter/lib/mojo/net/fetch.dart
View file @
7be4e421
...
@@ -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
;
}
}
}
}
...
...
packages/flutter/lib/mojo/net/image_cache.dart
View file @
7be4e421
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment