[fdo-dev] Assertions

Greg Boone greg.boone at autodesk.com
Mon Aug 14 10:13:47 EDT 2006


In general the rule is not to use assertions in FDO code. The general
rule is to throw an exception.

Greg

-----Original Message-----
From: Mateusz Loskot [mailto:mateusz at loskot.net] 
Sent: Saturday, August 12, 2006 11:04 PM
To: dev at fdo.osgeo.org
Subject: [fdo-dev] Assertions

Hi,

What is the recommended way to set assertions in FDO code?
As I see, there are used two types of asserts in FDO code:
- assert from <cassert> header
- ASSERT macro

I suppose that ASSERT macro is re-definition of _ASSERT from Windows
and on non-Windows platforms it is defined as empty macro, file
Fdo/Unmanaged/Src/Fdo/Schema/SchemaAttributeDictionary.cpp
or
Providers/GenericRdbms/Src/Fdo/Schema/FdoRdbmsDescribeSchemaCommand.cpp

Any recommendations?

FDO_CPPUNIT_ASSERT and CPPUNIT_ASSERT are only for usage in Unit
Tests, right?

Best regards
-- 
Mateusz Loskot
http://mateusz.loskot.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at fdo.osgeo.org
For additional commands, e-mail: dev-help at fdo.osgeo.org






More information about the Fdo_dev mailing list