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


On 11/01/2011 05:50 PM, Lubos Lunak wrote:
On Monday 31 of October 2011, Stephan Bergmann wrote:
For me at least, this implies that all occurrences of firing assertions
should be tracked and fixed.

(For me at least, this also implies that assertions---OSL_ASSERT,
OSL_ENSURE, OSL_FAIL, DBG_ASSERT---should only be used to flag illegal
program states, not for unexpected but legal ones.  I don't think there
is objection to this view in general.  I've only seen confusion about
which macro was designed for which use case, and a sort of indifference
a la "half of the time, OSL_ASSERT etc. are used with the wrong
semantics anyway; shrug.")

  I think the only feasible way of fixing this is introducing a new set of
these macros (let's say LO_WARN, LO_ASSERT), deprecating the old ones and
converting their usage to the new ones. Otherwise we'll never know which
OSL_ASSERT is really meant to assert and which is just a warning.

On the non-fatal side, you will definitely want to have something more fine grained than just OSL_TRACE (i.e., various levels, and the ability to specify---at runtime---which levels to see; something at least conceptually alike log4cxx that julien2412 mentioned).

And yes, moving to yet another fresh set of such macros is probably best, as you describe.

Guess I'll need to come up with a proposal over the next weeks...

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.