summaryrefslogtreecommitdiffstats
path: root/ceee
diff options
context:
space:
mode:
authorsiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-17 18:54:22 +0000
committersiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-17 18:54:22 +0000
commit2e1a109738310a6954f07edf6d2690d8c232efe3 (patch)
treebe4d67069a54db119b3391a9fb29a7394f8ffa19 /ceee
parent6c82c8157376c4bd6b341635faa44812f86e8baa (diff)
downloadchromium_src-2e1a109738310a6954f07edf6d2690d8c232efe3.zip
chromium_src-2e1a109738310a6954f07edf6d2690d8c232efe3.tar.gz
chromium_src-2e1a109738310a6954f07edf6d2690d8c232efe3.tar.bz2
Move log statements out of functions that contain __try/__except clauses, because logging instantiates objects, and under some compiler settings the two cannot coexist in the same function.
BUG=none TEST=it compiles Review URL: http://codereview.chromium.org/5104003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ceee')
-rw-r--r--ceee/ie/broker/broker_rpc_client.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/ceee/ie/broker/broker_rpc_client.cc b/ceee/ie/broker/broker_rpc_client.cc
index 38506d6..ab6b70e 100644
--- a/ceee/ie/broker/broker_rpc_client.cc
+++ b/ceee/ie/broker/broker_rpc_client.cc
@@ -35,11 +35,15 @@ int HandleRpcException(unsigned int rpc_exception_code) {
return EXCEPTION_EXECUTE_HANDLER;
}
+static void LogRpcException(const char* str, unsigned int exception_code) {
+ LOG(ERROR) << str << com::LogWe(exception_code);
+}
+
void BrokerRpcClient::LockContext() {
RpcTryExcept {
context_ = BrokerRpcClient_Connect(binding_handle_);
} RpcExcept(HandleRpcException(RpcExceptionCode())) {
- LOG(ERROR) << "RPC error in LockContext: " << RpcExceptionCode();
+ LogRpcException("RPC error in LockContext", RpcExceptionCode());
} RpcEndExcept
}
@@ -47,7 +51,7 @@ void BrokerRpcClient::ReleaseContext() {
RpcTryExcept {
BrokerRpcClient_Disconnect(binding_handle_, &context_);
} RpcExcept(HandleRpcException(RpcExceptionCode())) {
- LOG(ERROR) << "RPC error in ReleaseContext: " << RpcExceptionCode();
+ LogRpcException("RPC error in ReleaseContext", RpcExceptionCode());
} RpcEndExcept
}
@@ -110,7 +114,7 @@ bool BrokerRpcClient::FireEvent(BSTR event_name, BSTR event_args) {
BrokerRpcClient_FireEvent(binding_handle_, event_name, event_args);
return true;
} RpcExcept(HandleRpcException(RpcExceptionCode())) {
- LOG(ERROR) << "RPC error in FireEvent: " << RpcExceptionCode();
+ LogRpcException("RPC error in FireEvent", RpcExceptionCode());
} RpcEndExcept
return false;
}