Exception handling for client.cc