Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Aug 10, 2011, at 11:22 PM, julien2412 wrote:
cppcheck has detected 1 Throwing exception in destructor" line 88 of
core/bridges/test/java_uno/acquire/testacquire.cxx
(sorry I mentionned 2 locations on IRC cause I forgot about the new git repo
: it was in core and old ure repo)
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()
}

-Stephan


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.