You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2015/02/26 19:35:05 UTC

[jira] [Created] (THRIFT-3011) C# test server testException() not implemented according to specs

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)