[Insight-developers] ImageIterators : Suggested Patch: Exception

Gert Wollny gert at die.upm.es
Wed May 6 09:58:46 EDT 2009


On Wed, 2009-05-06 at 07:15 -0400, Luis Ibanez wrote:
> Hi Gert,
> 
> I like the option of having a Macro that
> 
>   * in Debug mode will use assert
>   * in Release mode will throw and exception.
> 
> 
I've hacked together a version that works on g++-4.3 - the ugly thing is
it uses __assert_fail(), which is only POSIX 2003 and only in the binary
standard (whatever that means). 

It shouldn't be too difficult to adapt it to the ITK way and add the
code path for non-posix, though. 

Regards, 

Gert 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: assertOrThrow.hh
Type: text/x-c++hdr
Size: 585 bytes
Desc: not available
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090506/6a7380fc/attachment.hh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testassert.cc
Type: text/x-c++src
Size: 281 bytes
Desc: not available
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090506/6a7380fc/attachment.cc>


More information about the Insight-developers mailing list