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/27 00:24:12 UTC

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

     [ https://issues.apache.org/jira/browse/THRIFT-3011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jens Geyer updated THRIFT-3011:
-------------------------------
    Attachment: THRIFT-3011-C-test-server-testException-not-implemen.patch

> 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
>
>         Attachments: THRIFT-3011-C-test-server-testException-not-implemen.patch
>
>
> {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)