[Libreoffice] Move DBG_ERROR[1-9] to OSL_TRACE
thomas at arnhold.org
Sat Apr 16 06:40:58 PDT 2011
hadn't time in the last weeks to fix this. I will do this in the next
On 03/21/2011 08:07 AM, David Tardon wrote:
> On Fri, Mar 18, 2011 at 08:53:36PM +0100, Thomas Arnhold wrote:
>> some days ago I converted all DBG_ERROR[1-9], which had a printf like
>> format string, to OSL_TRACE. David Tardon pointed me out that this
>> slightly changed the behavior, because the according OSL variant of
>> DBG_ERROR is OSL_FAIL (which is _OSL_ENSURE), which therefore breaks the
>> debug if OSL_FAIL got called.
> This is not exactly true: OSL_FAIL expands to (simplified)
> if (osl_assertFailedLine())
> The return value of osl_assertFailedLine is always true on OS/2, always
> false on Unix and variable on Windows (see sal/osl/*/diagnose.c). So
> what happens when an assertion is encountered depends on which platform
> the code runs on.
> On the other side, the behaviour of the old DBG_ assertions is
> configurable by user: it may show a msg box, abort, start a debugger...
> (presumably not every one of the options works on all platforms).
> Default is to show a msg box.
>> OSL_TRACE doesn't, it only prints a
>> message about this.
> As shown above, OSL_FAIL may "only print a message" too. But my argument
> was against changing an assertion to a trace, because, at least to me,
> assertion means "there is a problem", but trace is "just a debugging
> stuff, to be ignored".
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
More information about the LibreOffice