THRIFT-3758 TApplicationException::getType and TProtocolException::getType should be const

This closes #963
diff --git a/lib/cpp/src/thrift/TApplicationException.h b/lib/cpp/src/thrift/TApplicationException.h
index 0de5391..81d9424 100644
--- a/lib/cpp/src/thrift/TApplicationException.h
+++ b/lib/cpp/src/thrift/TApplicationException.h
@@ -65,7 +65,7 @@
    *
    * @return Error code
    */
-  TApplicationExceptionType getType() { return type_; }
+  TApplicationExceptionType getType() const { return type_; }
 
   virtual const char* what() const throw() {
     if (message_.empty()) {
diff --git a/lib/cpp/src/thrift/protocol/TProtocolException.h b/lib/cpp/src/thrift/protocol/TProtocolException.h
index 18a8ed0..6e536b4 100644
--- a/lib/cpp/src/thrift/protocol/TProtocolException.h
+++ b/lib/cpp/src/thrift/protocol/TProtocolException.h
@@ -67,7 +67,7 @@
    *
    * @return Error code
    */
-  TProtocolExceptionType getType() { return type_; }
+  TProtocolExceptionType getType() const { return type_; }
 
   virtual const char* what() const throw() {
     if (message_.empty()) {