Revert "Handle notification errors (#31868)" (#31886)

This reverts commit c0d5fd23ab.
This commit is contained in:
Dan Field
2019-04-30 23:27:30 -07:00
committed by GitHub
parent c82fc132a8
commit a8504405a8
3 changed files with 2 additions and 29 deletions

View File

@@ -237,16 +237,6 @@ class VMService {
}
static void _unhandledError(dynamic error, dynamic stack) {
if (error is rpc.RpcException) {
final rpc.RpcException rpcException = error;
if (rpcException.data != null && rpcException.data['id'] == null) {
// This can happen, e.g., if a client tries to call us before methods have
// been registered, but the client doesn't care for a response.
logger.printTrace('RPC client sent a notification that resulted in an error:\n$error');
return;
}
assert(false, 'json_rpc_2 failed to send an exception back to the client.');
}
logger.printTrace('Error in internal implementation of JSON RPC.\n$error\n$stack');
assert(false);
}