diff options
Diffstat (limited to 'ceee')
-rw-r--r-- | ceee/ie/broker/broker_rpc_client.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ceee/ie/broker/broker_rpc_client.cc b/ceee/ie/broker/broker_rpc_client.cc index 387f548..33e7d00 100644 --- a/ceee/ie/broker/broker_rpc_client.cc +++ b/ceee/ie/broker/broker_rpc_client.cc @@ -19,10 +19,16 @@ namespace { +// Avoid using objects requiring unwind in functions that use __try. void LogRpcException(const char* str, unsigned int exception_code) { LOG(ERROR) << str << com::LogWe(exception_code); } +// Avoid using objects requiring unwind in functions that use __try. +void RpcDcheck(const char* message) { + NOTREACHED() << message; +} + HRESULT BindRpc(std::wstring endpoint, RPC_BINDING_HANDLE* binding_handle) { DCHECK(binding_handle != NULL); std::wstring protocol = kRpcProtocol; @@ -157,7 +163,9 @@ template<class Function, class Params> HRESULT BrokerRpcClient::RunRpc(bool allow_restart, Function rpc_function, const Params& params) { - DCHECK(rpc_function); + if (!rpc_function) { + RpcDcheck("rpc_function is NULL"); + } if (!is_connected()) return RPC_E_FAULT; RpcTryExcept { |