diff --git a/lib/csharp/src/Protocol/TJSONProtocol.cs b/lib/csharp/src/Protocol/TJSONProtocol.cs
index 3390dc0..9dbdea9 100644
--- a/lib/csharp/src/Protocol/TJSONProtocol.cs
+++ b/lib/csharp/src/Protocol/TJSONProtocol.cs
@@ -859,19 +859,21 @@
             {
                 ReadJSONSyntaxChar(QUOTE);
             }
+
             string str = ReadJSONNumericChars();
             if (context.EscapeNumbers())
             {
                 ReadJSONSyntaxChar(QUOTE);
             }
+
             try
             {
                 return Int64.Parse(str);
             }
-            catch (FormatException)
+            catch (FormatException fex)
             {
                 throw new TProtocolException(TProtocolException.INVALID_DATA,
-                                             "Bad data encounted in numeric data");
+                                             "Bad data encounted in numeric data", fex);
             }
         }
 
@@ -887,8 +889,7 @@
                 byte[] arr = ReadJSONString(true);
                 double dub = Double.Parse(utf8Encoding.GetString(arr, 0, arr.Length), CultureInfo.InvariantCulture);
 
-                if (!context.EscapeNumbers() && !Double.IsNaN(dub) &&
-                    !Double.IsInfinity(dub))
+                if (!context.EscapeNumbers() && !Double.IsNaN(dub) && !Double.IsInfinity(dub))
                 {
                     // Throw exception -- we should not be in a string in this case
                     throw new TProtocolException(TProtocolException.INVALID_DATA,
@@ -907,10 +908,10 @@
                 {
                     return Double.Parse(ReadJSONNumericChars(), CultureInfo.InvariantCulture);
                 }
-                catch (FormatException)
+                catch (FormatException fex)
                 {
                     throw new TProtocolException(TProtocolException.INVALID_DATA,
-                                                 "Bad data encounted in numeric data");
+                                                 "Bad data encounted in numeric data", fex);
                 }
             }
         }
diff --git a/lib/csharp/src/Protocol/TProtocolException.cs b/lib/csharp/src/Protocol/TProtocolException.cs
index a89c3fc..c0f007e 100644
--- a/lib/csharp/src/Protocol/TProtocolException.cs
+++ b/lib/csharp/src/Protocol/TProtocolException.cs
@@ -48,14 +48,14 @@
             type_ = type;
         }
 
-        public TProtocolException(int type, string message)
-            : base(message)
+        public TProtocolException(int type, string message, Exception inner = null)
+            : base(message, inner)
         {
             type_ = type;
         }
 
-        public TProtocolException(string message)
-            : base(message)
+        public TProtocolException(string message, Exception inner = null)
+            : base(message, inner)
         {
         }
 
diff --git a/lib/csharp/src/TApplicationException.cs b/lib/csharp/src/TApplicationException.cs
index 0c5b08b..8dd7ae5 100644
--- a/lib/csharp/src/TApplicationException.cs
+++ b/lib/csharp/src/TApplicationException.cs
@@ -40,7 +40,7 @@
         }
 
         public TApplicationException(ExceptionType type, string message)
-            : base(message)
+            : base(message, null) // TApplicationException is serializable, but we never serialize InnerException
         {
             this.type = type;
         }
diff --git a/lib/csharp/src/TException.cs b/lib/csharp/src/TException.cs
index 35193c5..aa9a210 100644
--- a/lib/csharp/src/TException.cs
+++ b/lib/csharp/src/TException.cs
@@ -31,8 +31,8 @@
         {
         }
 
-        public TException(string message)
-            : base(message)
+        public TException(string message, Exception inner)
+            : base(message, inner)
         {
         }
 
diff --git a/lib/csharp/src/Transport/THttpClient.cs b/lib/csharp/src/Transport/THttpClient.cs
index 06ed6bc..667fc25 100644
--- a/lib/csharp/src/Transport/THttpClient.cs
+++ b/lib/csharp/src/Transport/THttpClient.cs
@@ -139,7 +139,7 @@
             }
             catch (IOException iox)
             {
-                throw new TTransportException(TTransportException.ExceptionType.Unknown, iox.ToString());
+                throw new TTransportException(TTransportException.ExceptionType.Unknown, iox.ToString(), iox);
             }
         }
 
@@ -217,11 +217,11 @@
             }
             catch (IOException iox)
             {
-                throw new TTransportException(TTransportException.ExceptionType.Unknown, iox.ToString());
+                throw new TTransportException(TTransportException.ExceptionType.Unknown, iox.ToString(), iox);
             }
             catch (WebException wx)
             {
-                throw new TTransportException(TTransportException.ExceptionType.Unknown, "Couldn't connect to server: " + wx);
+                throw new TTransportException(TTransportException.ExceptionType.Unknown, "Couldn't connect to server: " + wx, wx);
             }
         }
 
@@ -316,7 +316,7 @@
             }
             catch (IOException iox)
             {
-                throw new TTransportException(iox.ToString());
+                throw new TTransportException(iox.ToString(), iox);
             }
         }
 
@@ -360,7 +360,7 @@
             }
             catch (Exception exception)
             {
-                flushAsyncResult.AsyncException = new TTransportException(exception.ToString());
+                flushAsyncResult.AsyncException = new TTransportException(exception.ToString(), exception);
                 flushAsyncResult.UpdateStatusToComplete();
                 flushAsyncResult.NotifyCallbackWhenAvailable();
             }
@@ -375,7 +375,7 @@
             }
             catch (Exception exception)
             {
-                flushAsyncResult.AsyncException = new TTransportException(exception.ToString());
+                flushAsyncResult.AsyncException = new TTransportException(exception.ToString(), exception);
             }
             flushAsyncResult.UpdateStatusToComplete();
             flushAsyncResult.NotifyCallbackWhenAvailable();
diff --git a/lib/csharp/src/Transport/TNamedPipeServerTransport.cs b/lib/csharp/src/Transport/TNamedPipeServerTransport.cs
index a6cfb2e..32215cf 100644
--- a/lib/csharp/src/Transport/TNamedPipeServerTransport.cs
+++ b/lib/csharp/src/Transport/TNamedPipeServerTransport.cs
@@ -130,7 +130,7 @@
                             if (stream != null)
                                 eOuter = e;
                             else
-                                eOuter = new TTransportException(TTransportException.ExceptionType.Interrupted, e.Message);
+                                eOuter = new TTransportException(TTransportException.ExceptionType.Interrupted, e.Message, e);
                         }
                         evt.Set();
                     }, null);
@@ -157,7 +157,7 @@
             catch (Exception e)
             {
                 Close();
-                throw new TTransportException(TTransportException.ExceptionType.NotOpen, e.Message);
+                throw new TTransportException(TTransportException.ExceptionType.NotOpen, e.Message, e);
             }
         }
 
@@ -214,7 +214,7 @@
                             if (stream != null)
                                 eOuter = e;
                             else
-                                eOuter = new TTransportException(TTransportException.ExceptionType.Interrupted, e.Message);
+                                eOuter = new TTransportException(TTransportException.ExceptionType.Interrupted, e.Message, e);
                         }
                         evt.Set();
                     }, null);
@@ -265,7 +265,7 @@
                                 if (stream != null)
                                     eOuter = e;
                                 else
-                                    eOuter = new TTransportException(TTransportException.ExceptionType.Interrupted, e.Message);
+                                    eOuter = new TTransportException(TTransportException.ExceptionType.Interrupted, e.Message, e);
                             }
                             evt.Set();
                         }, null);
diff --git a/lib/csharp/src/Transport/TServerSocket.cs b/lib/csharp/src/Transport/TServerSocket.cs
index 40e47dc..d8ec62a 100644
--- a/lib/csharp/src/Transport/TServerSocket.cs
+++ b/lib/csharp/src/Transport/TServerSocket.cs
@@ -93,10 +93,10 @@
                 this.server = TSocketVersionizer.CreateTcpListener(this.port);
                 this.server.Server.NoDelay = true;
             }
-            catch (Exception)
+            catch (Exception ex)
             {
                 server = null;
-                throw new TTransportException("Could not create ServerSocket on port " + this.port + ".");
+                throw new TTransportException("Could not create ServerSocket on port " + this.port + ".", ex);
             }
         }
 
@@ -111,7 +111,7 @@
                 }
                 catch (SocketException sx)
                 {
-                    throw new TTransportException("Could not accept on listening socket: " + sx.Message);
+                    throw new TTransportException("Could not accept on listening socket: " + sx.Message, sx);
                 }
             }
         }
@@ -153,7 +153,7 @@
             }
             catch (Exception ex)
             {
-                throw new TTransportException(ex.ToString());
+                throw new TTransportException(ex.ToString(), ex);
             }
         }
 
@@ -167,7 +167,7 @@
                 }
                 catch (Exception ex)
                 {
-                    throw new TTransportException("WARNING: Could not close server socket: " + ex);
+                    throw new TTransportException("WARNING: Could not close server socket: " + ex, ex);
                 }
                 server = null;
             }
diff --git a/lib/csharp/src/Transport/TTLSServerSocket.cs b/lib/csharp/src/Transport/TTLSServerSocket.cs
index aa8ff7c..716a97c 100644
--- a/lib/csharp/src/Transport/TTLSServerSocket.cs
+++ b/lib/csharp/src/Transport/TTLSServerSocket.cs
@@ -129,10 +129,10 @@
                 this.server = TSocketVersionizer.CreateTcpListener(this.port);
                 this.server.Server.NoDelay = true;
             }
-            catch (Exception)
+            catch (Exception ex)
             {
                 server = null;
-                throw new TTransportException("Could not create ServerSocket on port " + this.port + ".");
+                throw new TTransportException("Could not create ServerSocket on port " + this.port + ".", ex);
             }
         }
 
@@ -150,7 +150,7 @@
                 }
                 catch (SocketException sx)
                 {
-                    throw new TTransportException("Could not accept on listening socket: " + sx.Message);
+                    throw new TTransportException("Could not accept on listening socket: " + sx.Message, sx);
                 }
             }
         }
@@ -197,7 +197,7 @@
             }
             catch (Exception ex)
             {
-                throw new TTransportException(ex.ToString());
+                throw new TTransportException(ex.ToString(), ex);
             }
         }
 
@@ -214,7 +214,7 @@
                 }
                 catch (Exception ex)
                 {
-                    throw new TTransportException("WARNING: Could not close server socket: " + ex);
+                    throw new TTransportException("WARNING: Could not close server socket: " + ex, ex);
                 }
                 this.server = null;
             }
diff --git a/lib/csharp/src/Transport/TTransportException.cs b/lib/csharp/src/Transport/TTransportException.cs
index ae987d5..7f6cc18 100644
--- a/lib/csharp/src/Transport/TTransportException.cs
+++ b/lib/csharp/src/Transport/TTransportException.cs
@@ -40,14 +40,14 @@
             this.type = type;
         }
 
-        public TTransportException(ExceptionType type, string message)
-            : base(message)
+        public TTransportException(ExceptionType type, string message, Exception inner = null)
+            : base(message, inner)
         {
             this.type = type;
         }
 
-        public TTransportException(string message)
-            : base(message)
+        public TTransportException(string message, Exception inner = null)
+            : base(message, inner)
         {
         }
 
