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
8d6dc620
Unverified
Commit
8d6dc620
authored
Aug 15, 2019
by
Jonah Williams
Committed by
GitHub
Aug 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rpc exception for real (#38575)
parent
a40ab895
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+4
-1
run_hot.dart
packages/flutter_tools/lib/src/run_hot.dart
+7
-2
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+1
-2
No files found.
packages/flutter_tools/lib/src/resident_runner.dart
View file @
8d6dc620
...
...
@@ -1116,7 +1116,10 @@ class TerminalHandler {
lastReceivedCommand
=
command
;
await
_commonTerminalInputHandler
(
command
);
}
catch
(
error
,
st
)
{
printError
(
'
$error
\n
$st
'
);
// Don't print stack traces for known error types.
if
(
error
is
!
ToolExit
)
{
printError
(
'
$error
\n
$st
'
);
}
await
_cleanUp
(
null
);
rethrow
;
}
finally
{
...
...
packages/flutter_tools/lib/src/run_hot.dart
View file @
8d6dc620
...
...
@@ -8,6 +8,7 @@ import 'package:json_rpc_2/error_code.dart' as rpc_error_code;
import
'package:json_rpc_2/json_rpc_2.dart'
as
rpc
;
import
'package:meta/meta.dart'
;
import
'base/async_guard.dart'
;
import
'base/common.dart'
;
import
'base/context.dart'
;
import
'base/file_system.dart'
;
...
...
@@ -576,10 +577,14 @@ class HotRunner extends ResidentRunner {
if
(!(
await
hotRunnerConfig
.
setupHotRestart
()))
{
return
OperationResult
(
1
,
'setupHotRestart failed'
);
}
result
=
await
_restartFromSources
(
// The current implementation of the vmservice and JSON rpc may throw
// unhandled exceptions into the zone that cannot be caught with a regular
// try catch. The usage is [asyncGuard] is required to normalize the error
// handling, at least until we can refactor the underlying code.
result
=
await
asyncGuard
(()
=>
_restartFromSources
(
reason:
reason
,
benchmarkMode:
benchmarkMode
,
);
)
)
;
if
(!
result
.
isOk
)
{
restartEvent
=
'restart-failed'
;
}
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
8d6dc620
...
...
@@ -13,7 +13,6 @@ import 'package:stream_channel/stream_channel.dart';
import
'package:web_socket_channel/io.dart'
;
import
'package:web_socket_channel/web_socket_channel.dart'
;
import
'base/async_guard.dart'
;
import
'base/common.dart'
;
import
'base/context.dart'
;
import
'base/file_system.dart'
;
...
...
@@ -359,7 +358,7 @@ class VMService {
Future
<
void
>
_streamListen
(
String
streamId
)
async
{
if
(!
_listeningFor
.
contains
(
streamId
))
{
_listeningFor
.
add
(
streamId
);
await
asyncGuard
(()
=>
_sendRequest
(
'streamListen'
,
<
String
,
dynamic
>{
'streamId'
:
streamId
})
);
await
_sendRequest
(
'streamListen'
,
<
String
,
dynamic
>{
'streamId'
:
streamId
}
);
}
}
...
...
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