[
https://issues.apache.org/jira/browse/THRIFT-2342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14935947#comment-14935947
]
James E. King, III commented on THRIFT-2342:
--------------------------------------------
I don't think it is wise to add a backtrace to every exception. That is very
expensive as compared to languages that have backtrace support for exceptions
as a built-in. Further, a std::exception will not have the backtrace. I also
don't think it is a good idea to send full path file and line information over
the wire to a client - that's a security issue. To solve the specific issue
mentioned in the description on the required fields it would be nice to have a
way for the exception to specify what is invalid, agreed, however that looks
like a separate ticket from the title. I'm inclined to close the ticket as
"Won't Fix" based on my arguments above, and then open a new ticket to track
the specific deficiency in the INVALID_DATA response handling. [~roger.meier]
would you agree?
> 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
>
> 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.3.4#6332)