Re: [eigen] exceptions in Eigen |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] exceptions in Eigen
- From: Andy Somogyi <andy.somogyi@xxxxxxxxx>
- Date: Thu, 23 Sep 2010 16:37:27 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=9d/f0m41HgMVK3CXGYTas2j859qARtKB4xvSFAaiYLk=; b=FhWr9bKEPj+q2UBwxz3kvk3hIK2NlEhSAJMvTrjmx5NOY/VTcjUR6CBmB2MaSFrM+0 2nghU+rV8eq8osiqd46ssqZRAbmPeuI3ZJZFUUKUCFrpPlU4UoOI6I5AQAbjpOAquYro LxDmc6qJIn299qUbFjd0R37mXCsnaR742iZ1k=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=M4Qz0qPwqh/pQXlTFqxObmPDx6/nY980nErA7cAuEBjTw7+GPsts0pbmuZp8SHH5hQ sctWuTLF2s5JJ9YB4+O3VFRzGwZWxNGE7Hb4+i3QxNtxTiXNpKtXKrIqcK2JsP8lYGi1 yTpIlms56qHs+h60BAiOlJH4pv0LpSUL+yvzU=
Defining my own ei_assert() macro worked perfect, handles errors exactly how I would like it to!
thanks much
On Sep 23, 2010, at 1:28 PM, Benoit Jacob wrote:
> 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
>
>>
>>
>>
>>
>>
>
>