Skip to content

Commit

Permalink
fix: use reference to catch exception (#798)
Browse files Browse the repository at this point in the history
  • Loading branch information
levy5307 authored Aug 2, 2021
1 parent c71cc47 commit 874f868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/pegasus_server_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int pegasus_server_write::on_batched_write_requests(dsn::message_ex **requests,
dassert_f(count == 1, "count = {}", count);
return iter->second(requests[0]);
}
} catch (TTransportException ex) {
} catch (TTransportException &ex) {
_pfc_recent_corrupt_write_count->increment();
derror_replica("pegasus not batch write handler failed, from = {}, exception = {}",
requests[0]->header->from_address.to_string(),
Expand Down Expand Up @@ -108,7 +108,7 @@ int pegasus_server_write::on_batched_writes(dsn::message_ex **requests, int coun
dfatal_f("rpc code not handled: {}", rpc_code.to_string());
}
}
} catch (TTransportException ex) {
} catch (TTransportException &ex) {
_pfc_recent_corrupt_write_count->increment();
derror_replica("pegasus batch writes handler failed, from = {}, exception = {}",
requests[i]->header->from_address.to_string(),
Expand Down

0 comments on commit 874f868

Please sign in to comment.