[Libreoffice] gravity of raised assertions?

Lubos Lunak l.lunak at suse.cz
Tue Nov 1 09:50:52 PDT 2011


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.

-- 
 Lubos Lunak
 l.lunak at suse.cz


More information about the LibreOffice mailing list