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


On 03/21/2012 03:33 PM, Caolán McNamara wrote:
On Wed, 2012-03-21 at 10:04 +0100, Stephan Bergmann wrote:
it would IMO be nice to nevertheless have information about functions'
exception behaviour around, in a form suitable for mechanical
verification.  (For example by disabling GCC's -fno-enforce-eh-specs
for --enable-dbgutil builds.)  But maybe that's only a hopeless pipe
dream of mine, anyway...

Aren't we already doomed in the sense that if we take any signature
like..

virtual sal_Bool SAL_CALL foo(void) throw( uno::RuntimeException )

then if that foo is implemented using various bits of boost magic or
stl, and there's surely thousands that are, then they can throw loads of
stuff, under various edge-conditions, which are unrelated to
uno::RuntimeException unless foo does a pile of catching and converting
std::exceptions into uno::RuntimeException ?

Yes, sure. It is a design error of the UNO C++ language binding that all those functions do not additionally contain certain std exceptions (bad_alloc, runtime_error, ios_base::failure, probably) in their exceptions specifications. (And one can argue that it is a design error of C++ to not offer a distinction between checked and unchecked exceptions, a la Java.) Witness the handful of places in the code (mostly written by myself, I guess) that *do* translate std::bad_alloc into a UNO RuntimeException -- an arguably misguided approach I quickly gave up on again. ;)

But that's a good argument that simply "disabling GCC's -fno-enforce-eh-specs for --enable-dbgutil builds" wouldn't quite cut it.

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.