Re: [eigen] exceptions in Eigen

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


2010/9/23 Andy Somogyi <andy.somogyi@xxxxxxxxx>:
> Hey guys,
>
> Has there been any thought of optionally using exceptions instead of assertions as error handling in Eigen?
>
> I'm using Eigen in an environment where run-time debugging is pretty much impossible, and when Eigen asserts, it as expected brings the entire app down. What would be really great is instead of an assertion, it would throw an exception that I could catch, and then simply print an error string.
>
> I think that exception support would be a really great compile time option.

Actually I agree. The good news is that that would be really easy to
plug into eigen's existing code. All our runtime assertions go through
a single macro, ei_assert(), that's defined in
Eigen/src/Core/util/Macros.h. So you just have to override this macro,
you don't need any Eigen knowledge.

>
> BTW, in general, I think Eigen is an awesome library, thanks.  I switched from boost's ublas to Eigen mostly because it is SO MUCH EASIER to wrap an Eigen class around an existing raw block of memory via ***::Map, I had to write bunch of classes to get ublas to support this feature.

Cool, thanks
Benoit

>
>
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/