[
https://issues.apache.org/jira/browse/THRIFT-2581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14042007#comment-14042007
]
Henrique Mendonça commented on THRIFT-2581:
-------------------------------------------
Hi Ben,
Sorry for the delay. I think we only get undefined behavior on the destructor
throwing, but I'd be fine with removing the test too as I said before. This
means log and don't throw; I personally don't think we should abort on this
situation, the pure signal is not better than the exception at all.
Would you have a patch for it then?
Otherwise I'd just commit mine since it at least gets the old behavior to work
on c++11 and the CI builds should run again. We have many other tickets pending
as you now :/
Cheers,
Henrique
> TFDTransport destructor should not throw
> -----------------------------------------
>
> Key: THRIFT-2581
> URL: https://issues.apache.org/jira/browse/THRIFT-2581
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.9
> Reporter: Henrique Mendonça
> Assignee: Henrique Mendonça
> Priority: Minor
> Fix For: 0.9.2
>
> Attachments: THRIFT-2581-TFDTransport-destructor.patch
>
>
> Following the discussion on https://github.com/apache/thrift/pull/142
> ~TFDTransport seems to be the only throwing destructor from all transports.
> Throwing from a destructor is considered not safe under certain conditions
> and should be avoided.
> The c++ standard defines a default noexcept for default destructors as
> mentioned in:
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3166.html
> This will cause the current behavior to fail under C++11.
> In my opinion, we should catch this mentioned exception in the destructor and
> log it. This will require to explicitly call the close() method in order to
> catch the exception.
--
This message was sent by Atlassian JIRA
(v6.2#6252)