Unverified Commit ea30c95d authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Report RpcException error thrown by _reloadSource vmservice rpc. (#16417)

* Don't return null, just rethrow RpcException error when vmservice responds with error.
parent fb0ab99d
......@@ -534,7 +534,9 @@ class HotRunner extends ResidentRunner {
pause: pause
);
countExpectedReports += reports.length;
Future.wait(reports).then((List<Map<String, dynamic>> list) {
Future.wait(reports).catchError((dynamic error) {
return <Map<String, dynamic>>[error];
}).then((List<Map<String, dynamic>> list) {
// TODO(aam): Investigate why we are validating only first reload report,
// which seems to be current behavior
final Map<String, dynamic> firstReport = list.first;
......
......@@ -755,7 +755,7 @@ class VM extends ServiceObjectOwner {
} on rpc.RpcException catch (error) {
printError('Error ${error.code} received from application: ${error.message}');
printTrace('${error.data}');
return null;
rethrow;
}
}
......
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