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


On 28/10/11 16:06, Noel Power wrote:
 Without getting into a religous war about it I
personally don't buy that OSL_ENSURE should abort ( I am though a
believer in that behaviour for for OSL_ASSERT ) Perhaps I am abusing the
true use for OSL_ENSURE, maybe there is a case for an OSL_WARNING ( but
do we really need yet another macro )

#define OSL_TRACE           _OSL_TRACE
#define OSL_ASSERT(c)       _OSL_ENSURE(c, OSL_THIS_FILE, __LINE__, 0)
#define OSL_ENSURE(c, m)   _OSL_ENSURE(c, OSL_THIS_FILE, __LINE__, m)
#define OSL_FAIL(m)        _OSL_ENSURE(0, OSL_THIS_FILE, __LINE__, m)

so OSL_ASSERT and OSL_ENSURE are basically the same thing, the latter just takes a message.

if you want something with different intent from OSL_ENSURE then just use OSL_TRACE.

perhaps OSL_WARNING could be something like: if (c) { OSL_TRACE(m); }
but it does not exist now...


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.