[Botan-devel] Catching 'Botan::Decoding_Error'

Jack Lloyd lloyd at randombit.net
Wed Nov 3 14:52:04 EDT 2010


On Wed, Nov 03, 2010 at 06:38:28PM +0100, Gregor Schrrrgle wrote:
> 
> and I am not able to catch the exception with a catch statement (e.g. catch
> (std::exception& e) ).
> 

Hi Gregor,

I find this quite strange; Decoding_Error is derived from
std::exception, so a catch for a std::exception& should capture
it. Can you try adding an explicit catch clause for Decoding_Error,
just to see if it makes any different? I'm afraid nothing obvious is
coming to mind; certainly this seems like it should work as-is.

I would assume from the error text that you are running on Windows.
Which compiler are you using? Is this with a shared or static library?
Are you sure that you used the exact same runtime setting as the
library? (/MD is the default; it seems like any deviation among any
libraries and the application will cause problems, though they
_usually_ show up as link-time errors).

-Jack



More information about the botan-devel mailing list