On Fri, Mar 18, 2011 at 08:53:36PM +0100, Thomas Arnhold wrote:
Hi,
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())
osl_breakDebug();
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".
D.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
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.