Repository: thrift
Updated Branches:
  refs/heads/master 12b06e4f8 -> 8b14d179c


THRIFT-3011 C# test server testException() not implemented according to specs
Client: C#
Patch: Jens Geyer


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/8b14d179
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/8b14d179
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/8b14d179

Branch: refs/heads/master
Commit: 8b14d179c4a5f6335989fa11ac3c1117daa2f86b
Parents: 12b06e4
Author: Jens Geyer <[email protected]>
Authored: Thu Feb 26 19:36:28 2015 +0100
Committer: Jens Geyer <[email protected]>
Committed: Fri Feb 27 00:27:00 2015 +0100

----------------------------------------------------------------------
 lib/csharp/test/ThriftTest/TestServer.cs | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/8b14d179/lib/csharp/test/ThriftTest/TestServer.cs
----------------------------------------------------------------------
diff --git a/lib/csharp/test/ThriftTest/TestServer.cs 
b/lib/csharp/test/ThriftTest/TestServer.cs
index 615ead8..2096cf8 100644
--- a/lib/csharp/test/ThriftTest/TestServer.cs
+++ b/lib/csharp/test/ThriftTest/TestServer.cs
@@ -293,6 +293,13 @@ namespace Test
                 return hello;
             }
 
+            /**
+             * Print 'testException(%s)' with arg as '%s'
+             * @param string arg - a string indication what type of exception 
to throw
+             * if arg == "Xception" throw Xception with errorCode = 1001 and 
message = arg
+             * elsen if arg == "TException" throw TException
+             * else do not throw anything
+             */
             public void testException(string arg)
             {
                 Console.WriteLine("testException(" + arg + ")");
@@ -300,9 +307,13 @@ namespace Test
                 {
                     Xception x = new Xception();
                     x.ErrorCode = 1001;
-                    x.Message = "This is an Xception";
+                    x.Message = arg;
                     throw x;
                 }
+                if (arg == "TException")
+                {
+                    throw new Thrift.TException();
+                }
                 return;
             }
 

Reply via email to