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


On 10/24/2011 05:59 PM, Terrence Enger wrote:
I shall proceed with that.  And, unless somebody tells me otherwise, I
shall indulge myself with OSL_ENSURE() on the return values.

Note that OSL_ENSURE, OSL_ASSERT, and OSL_FAIL should only be used for logic errors (i.e., the program detects that it contains an error and ends up in a state that "cannot happen"), not for uncommon situations that nevertheless should be handled, like IO errors or malformed user input. OSL_TRACE, on the other hand, is the tool of choice to document "interesting" events during program execution (which is only evaluated when built with DEBUG=TRUE, however). -- Even if lots of places in the code base misuse the former for the latter. Ideally, OSL_ENSURE et al. should directly abort program execution, but we're not there, yet.

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.