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
09e68c33
Commit
09e68c33
authored
Aug 24, 2016
by
John McCutchan
Committed by
GitHub
Aug 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect when isolate reload is barred and inform the user (#5582)
parent
95fbb71f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
engine.version
bin/cache/engine.version
+1
-1
hot.dart
packages/flutter_tools/lib/src/hot.dart
+11
-2
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+8
-2
No files found.
bin/cache/engine.version
View file @
09e68c33
28e9b3bc49a83cf5d7a1da2222c02f0f929b1909
b2e592592fa070afebd7c062cad245d152a4d370
packages/flutter_tools/lib/src/hot.dart
View file @
09e68c33
...
...
@@ -445,9 +445,18 @@ class HotRunner extends ResidentRunner {
}
else
{
flutterUsage
.
sendEvent
(
'hot'
,
'reload'
);
}
}
catch
(
errorMessage
,
st
)
{
}
catch
(
error
,
st
)
{
int
errorCode
=
error
[
'code'
];
if
(
errorCode
==
Isolate
.
kIsolateReloadBarred
)
{
printError
(
'Unable to hot reload app due to an unrecoverable error in '
'the source code. Please address the error and then '
'Use "R" to restart the app.'
);
flutterUsage
.
sendEvent
(
'hot'
,
'reload-barred'
);
return
false
;
}
String
errorMessage
=
error
[
'message'
];
reloadStatus
.
stop
(
showElapsedTime:
true
);
printError
(
'Hot reload failed:
\n
$errorMessage
\n
$st
'
);
printError
(
'Hot reload failed:
\n
code =
$errorCode
\n
message =
$errorMessage
\n
$st
'
);
return
false
;
}
await
_evictDirtyAssets
();
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
09e68c33
...
...
@@ -749,12 +749,18 @@ class Isolate extends ServiceObjectOwner {
_upgradeCollection
(
map
,
this
);
}
static
final
int
kIsolateReloadBarred
=
1005
;
Future
<
Map
<
String
,
dynamic
>>
reloadSources
()
async
{
try
{
Map
<
String
,
dynamic
>
response
=
await
invokeRpcRaw
(
'_reloadSources'
);
return
response
;
}
catch
(
e
)
{
return
new
Future
<
Map
<
String
,
dynamic
>>.
error
(
e
.
data
[
'details'
]);
}
on
rpc
.
RpcException
catch
(
e
)
{
return
new
Future
<
Map
<
String
,
dynamic
>>.
error
(<
String
,
dynamic
>{
'code'
:
e
.
code
,
'message'
:
e
.
message
,
'data'
:
e
.
data
,
});
}
}
...
...
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