fix static analyzer warings
diff --git a/lib/cpp/test/AllProtocolTests.tcc b/lib/cpp/test/AllProtocolTests.tcc
index a7eab07..80a4ea0 100644
--- a/lib/cpp/test/AllProtocolTests.tcc
+++ b/lib/cpp/test/AllProtocolTests.tcc
@@ -216,7 +216,7 @@
     testMessage<TProto>();
 
     printf("%s => OK\n", protoname);
-  } catch (TException e) {
+  } catch (const TException &e) {
     THRIFT_SNPRINTF(errorMessage, ERR_LEN, "%s => Test FAILED: %s", protoname, e.what());
     throw TException(errorMessage);
   }