https://bugs.freedesktop.org/show_bug.cgi?id=43157

             Bug #: 43157
           Summary: Clean up OSL_ASSERT, DBG_ASSERT, etc.
    Classification: Unclassified
           Product: LibreOffice
           Version: LibO Master
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Libreoffice
        AssignedTo: [email protected]
        ReportedBy: [email protected]


The assertion/logging functionality from osl/diagnose.h (OSL_TRACE, OSL_ASSERT,
OSL_ENSURE, OSL_FAIL) and tools/debug.hxx (DBG_ASSERTWARNING, DBG_ASSERT,
DBG_BF_ASSERT, DBG_WARNING, DBG_WARNING1--5, DBG_WARNINGFILE, DBG_ERRORFILE) is
obsolete and needs to be cleaned up:

* To assert invariants of the code (that can only be violated if there are
programming errors) use standard C/C++ assert.

* To log warnings about unusual events (that the code nevertheless needs to
handle in some way, like malformed input or I/O failures), use the SAL_WARN...
macros from sal/log.h.

* To log other information useful for debugging, use the SAL_INFO... macros.

See <https://wiki.documentfoundation.org/Development#Assertions_and_Logging>,
the mail thread at
<http://lists.freedesktop.org/archives/libreoffice/2011-November/020864.html>,
and the documentation in the sal/log.h header for further information.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to