From: Kresimir Fresl (fresl_at_[hidden])
Date: 2002-09-13 03:46:49
Toon Knapen wrote:
> On Friday 13 September 2002 09:38, Kresimir Fresl wrote:
>>Toon Knapen wrote:
>>>the bounds checking mechanism throws an exception instead of performing
>>>an assert. But I have no clue how I can ask my debugger where the
>>>exception was thrown so I would prefer an assert() to be used. In the
>>>debugger, it's then easy to perform a stack_trace.
>>Did you try to define BOOST_NO_EXCEPTIONS ?
> This indeed would give me the behaviour I want as also redefining throw with
> a macro (as Peter suggested).
> Setting BOOST_NO_EXCEPTIONS however (which changes the semantics of the
> program) just for catching my out-of-bounds-error is a little drastic.
> It does indeed abort on the out-of-bouds error but the rest of my code that
> might rely on exceptions also changes and thus is not an optimal solution.
On the other hand, BOOST_UBLAS_CHECK is also a macro which is
disabled with -DNDEBUG and therefore it won't be ``called'' in release
mode. Your own exception code (which must remain in release
mode) is not affected with BOOST_UBLAS_CHECK and NDEBUG.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk