Github user marshalium commented on the pull request:

    https://github.com/apache/thrift/pull/512#issuecomment-110194778
  
    Jira opened: https://issues.apache.org/jira/browse/THRIFT-3182
    
    I added the new exception as a subclass of TTransportException exception 
type because I think it's more user friendly to catch specific exception 
subclasses when the user of the api cares to. Is it more the Thrift style to 
add another type constant to TTransportException and not subclass? That way a 
user has to catch TTransportException and then switch on type.
    
    I think users may want to handle this exception differently because it can 
mean that the client has a misconfigured frame size or is requesting too much 
data.
    
    Looking at some of the other clients (for example: 
https://github.com/apache/thrift/blob/master/lib/csharp/src/Transport/TFramedTransport.cs)
 they don't seem to even enforce that the frame size is valid. But I think they 
could all be updated to both validate the frame size and properly close the 
transport when they read an invalid one.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to