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

* Don't return null, just rethrow RpcException error when vmservice responds with error.
This commit is contained in:
Alexander Aprelev 2018-04-13 17:02:14 -07:00 committed by GitHub
parent fb0ab99d6f
commit ea30c95dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}
}