FAQ

[Thrift-dev] [jira] [Created] (THRIFT-1517) TTransport.ReadAll() should set exception type to EndOfFile

Stefan Gmeiner (Created) (JIRA)
Feb 17, 2012 at 7:12 am
TTransport.ReadAll() should set exception type to EndOfFile
-----------------------------------------------------------

Key: THRIFT-1517
URL: https://issues.apache.org/jira/browse/THRIFT-1517
Project: Thrift
Issue Type: Bug
Components: C# - Library
Affects Versions: 0.8
Reporter: Stefan Gmeiner
Priority: Minor


The TTransport.ReadAll() throws a TTransportException(string) if read returns <= 0. The exception text is "Cannot read, Remote side has closed." but the exception type is not set. To allow checking for EOF condition in catch blocks I suggest to set the type to TTransportException.ExceptionType.EndOfFile. BTW this is the same as in the C++ library.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
reply

Search Discussions

3 responses

  • Stefan Gmeiner (Updated) (JIRA) at Feb 17, 2012 at 7:14 am
    [ https://issues.apache.org/jira/browse/THRIFT-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Stefan Gmeiner updated THRIFT-1517:
    -----------------------------------

    Attachment: THRIFT-1517.patch
    TTransport.ReadAll() should set exception type to EndOfFile
    -----------------------------------------------------------

    Key: THRIFT-1517
    URL: https://issues.apache.org/jira/browse/THRIFT-1517
    Project: Thrift
    Issue Type: Bug
    Components: C# - Library
    Affects Versions: 0.8
    Reporter: Stefan Gmeiner
    Priority: Minor
    Attachments: THRIFT-1517.patch


    The TTransport.ReadAll() throws a TTransportException(string) if read returns <= 0. The exception text is "Cannot read, Remote side has closed." but the exception type is not set. To allow checking for EOF condition in catch blocks I suggest to set the type to TTransportException.ExceptionType.EndOfFile. BTW this is the same as in the C++ library.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Roger Meier (Resolved) (JIRA) at Feb 19, 2012 at 6:55 pm
    [ https://issues.apache.org/jira/browse/THRIFT-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Roger Meier resolved THRIFT-1517.
    ---------------------------------

    Resolution: Fixed

    Thanks, committed.
    TTransport.ReadAll() should set exception type to EndOfFile
    -----------------------------------------------------------

    Key: THRIFT-1517
    URL: https://issues.apache.org/jira/browse/THRIFT-1517
    Project: Thrift
    Issue Type: Bug
    Components: C# - Library
    Affects Versions: 0.8
    Reporter: Stefan Gmeiner
    Priority: Minor
    Attachments: THRIFT-1517.patch


    The TTransport.ReadAll() throws a TTransportException(string) if read returns <= 0. The exception text is "Cannot read, Remote side has closed." but the exception type is not set. To allow checking for EOF condition in catch blocks I suggest to set the type to TTransportException.ExceptionType.EndOfFile. BTW this is the same as in the C++ library.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Hudson (Commented) (JIRA) at Feb 19, 2012 at 7:44 pm
    [ https://issues.apache.org/jira/browse/THRIFT-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211510#comment-13211510 ]

    Hudson commented on THRIFT-1517:
    --------------------------------

    Integrated in Thrift #407 (See [https://builds.apache.org/job/Thrift/407/])
    THRIFT-1517 TTransport.ReadAll() should set exception type to EndOfFile
    Patch: Stefan Gmeiner (Revision 1291039)

    Result = SUCCESS
    roger : http://svn.apache.org/viewvc/?view=rev&rev=1291039
    Files :
    * /thrift/trunk/lib/csharp/src/Transport/TTransport.cs

    TTransport.ReadAll() should set exception type to EndOfFile
    -----------------------------------------------------------

    Key: THRIFT-1517
    URL: https://issues.apache.org/jira/browse/THRIFT-1517
    Project: Thrift
    Issue Type: Bug
    Components: C# - Library
    Affects Versions: 0.8
    Reporter: Stefan Gmeiner
    Priority: Minor
    Attachments: THRIFT-1517.patch


    The TTransport.ReadAll() throws a TTransportException(string) if read returns <= 0. The exception text is "Cannot read, Remote side has closed." but the exception type is not set. To allow checking for EOF condition in catch blocks I suggest to set the type to TTransportException.ExceptionType.EndOfFile. BTW this is the same as in the C++ library.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira

Related Discussions

Discussion Navigation
viewthread | post

1 user in discussion

Hudson (Commented) (JIRA): 4 posts