mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
This reverts commit c0d5fd23ab
.
This commit is contained in:
parent
c82fc132a8
commit
a8504405a8
@ -934,18 +934,9 @@ void restoreVmServiceConnectFunction() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _unhandledJsonRpcError(dynamic error, dynamic stack) {
|
void _unhandledJsonRpcError(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.
|
|
||||||
_log.trace('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.');
|
|
||||||
}
|
|
||||||
_log.trace('Unhandled RPC error:\n$error\n$stack');
|
_log.trace('Unhandled RPC error:\n$error\n$stack');
|
||||||
assert(false);
|
// TODO(dnfield): https://github.com/flutter/flutter/issues/31813
|
||||||
|
// assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Waits for a real Dart VM service to become available, then connects using
|
/// Waits for a real Dart VM service to become available, then connects using
|
||||||
|
@ -237,16 +237,6 @@ class VMService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void _unhandledError(dynamic error, dynamic stack) {
|
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');
|
logger.printTrace('Error in internal implementation of JSON RPC.\n$error\n$stack');
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
@ -33,14 +33,6 @@ RpcPeerConnectionFunction fuchsiaVmServiceConnectionFunction = _waitAndConnect;
|
|||||||
|
|
||||||
|
|
||||||
void _unhandledJsonRpcError(dynamic error, dynamic stack) {
|
void _unhandledJsonRpcError(dynamic error, dynamic stack) {
|
||||||
if (error is json_rpc.RpcException) {
|
|
||||||
final json_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.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_log.fine('Error in internalimplementation of JSON RPC.\n$error\n$stack');
|
_log.fine('Error in internalimplementation of JSON RPC.\n$error\n$stack');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user