|Re: [eigen] exceptions in Eigen|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] exceptions in Eigen
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 23 Sep 2010 13:28:38 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=07VeImc9/8uTZhGg/o9Lrq03D6/tfa2PgSZ0Rm85e8U=; b=TxyivwY+1ahuY3F6PW/sKMs+usBsCkRvNyHWvsZJKKuRv5RSqlIbrNfufNstFNgiMn jh3PKxmU1K4CMFJ3kfgBVEabO+NKyvIE+W82YMRPirRZ5r37yNUwTRhhCw2homlVOPGK Io3Nx38Y7ZxGRIIE0n+QANsj71TqrXQYdr2eU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=SVO9Wsc8cJFBGC1qsDIrifTUucxiRwbhTtbVup12TauBzKVPSdtO+bz85bUVvvd25B vI6HAfhVNibp9cZ4pPa6lNYLDbv+oyfHmoJAnFpWVKRkmZvm7BFNPD4sW8+RZ23dE56u IO/oaJF0Wyzg1FRBOskdTSrY9d+ig0r9TiKuc=
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.