Jens Geyer created THRIFT-3011:
----------------------------------

             Summary: C# test server testException() not implemented according 
to specs
                 Key: THRIFT-3011
                 URL: https://issues.apache.org/jira/browse/THRIFT-3011
             Project: Thrift
          Issue Type: Bug
          Components: C# - Library
            Reporter: Jens Geyer
            Assignee: Jens Geyer
             Fix For: 0.9.3


{code:title=ThriftTest.thrift}
  /**
   * 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
   */
  void testException(1: string arg) throws(1: Xception err1),
{code}

Actual implementation:

{code:title=TestServer.cs}
public void testException(string arg)
{
        Console.WriteLine("testException(" + arg + ")");
        if (arg == "Xception")
        {
                Xception x = new Xception();
                x.ErrorCode = 1001;
                x.Message = "This is an Xception";
                throw x;
        }
        return;
}
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to