[Libreoffice] Throwing exception in destructor

julien2412 serval2412 at yahoo.fr
Thu Aug 11 12:36:01 PDT 2011


Stephan Bergmann wrote:
> 
> On Aug 10, 2011, at 11:22 PM, julien2412 wrote:
> ...
>> Could it be replaced by just a log (which function should be used for
>> this
>> kind of case ?) or something since a throw in destructor should be
>> avoided ?
> Given that assertNotNull() further down in that file uses std::abort to
> signal failure, the best fix probably is to use that in ~WaitCondition,
> too:
> 
> if (m_condition.wait() != osl::Condition::result_ok) {
>     std::cerr << "osl::Condition::wait failed\n";
>     std::abort()
> }
> 
Ok thank you for the answer, I commited and pushed on master.

Julien.

--
View this message in context: http://nabble.documentfoundation.org/Throwing-exception-in-destructor-tp3243968p3247197.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list