You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2014/02/02 18:38:09 UTC

[jira] [Commented] (THRIFT-2342) Add __FILE__ and __LINE__ to Thrift C++ excpetions

    [ https://issues.apache.org/jira/browse/THRIFT-2342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13888984#comment-13888984 ] 

Roger Meier commented on THRIFT-2342:
-------------------------------------

good idea!

patches are welcome, see
http://thrift.apache.org/docs/HowToContribute


> Add __FILE__ and __LINE__ to Thrift C++ excpetions
> --------------------------------------------------
>
>                 Key: THRIFT-2342
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2342
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler, C++ - Library
>            Reporter: George Godik
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.9.2
>
>
> Thrift exceptions are somewhat difficult to trace from debug logs. I'd like to add __FILE__AND__LINE__ as a second parameter to some exceptions to make them easier to find.
> For example:
> Every time a required field is not set, the exception that gets generated is a very generic
> throw TProtocolException(TProtocolException::INVALID_DATA)
> see - https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=compiler/cpp/src/generate/t_cpp_generator.cc;h=298096d3265baa1f008501eb7c26bb4ae96ffa4b;hb=HEAD#l1372
> I think I'll start with patching up TProtocolExcpetion in the compiler and if people like this I can make a separate issue and patch for other exceptions



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)