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


On 01/18/2017 02:41 PM, Michael Stahl wrote:
currently the exception specifications effectively serve as an assertion
mechanism where an API implementation fails the assertion if it throws
an exception that it isn't documented to throw.

this happens from time to time, so i wonder what replacement you have in
mind for the current 1000s of assertions to quickly and easily detect
such bugs.

None. :) C++ no longer offers reasonable support for that (if it ever did adequately), so I guess we have to live with that, for better or worse.

The UNO bridges should silently translate invalid exceptions to RuntimeExceptions today. We could make at least those violations more obvious, by e.g. turning into a failing assert those cases where an invalid UNO exception is attempted to be thrown across a bridge (in comparison to, say, some std::exception, for which silent translation to RuntimeException is probably fine already).


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.