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

Gregor Schrägle gregor.schraegle at gmx.de
Wed Nov 3 15:19:50 EDT 2010

Dear Jack,

thanks for your super fast answer!

Here are a few more details to my problem:

- Yes, you are correct, I am running on Windows.
- I tried catching the Botan::Decoding_Error exception explicitly already.
It showed the same result: termination of the entire program.
- I am using the MinGW GCC Compiler with a static Botan library (libbotan.a)
built from the Botan-1.8.9 sources

I will try to check the runtime settings as you suggested (the settings used
for the library and the one used in my executable).
Could you give me a hint where I need to check these settings - are they
applicable if I am not using Visual C++?

Thank you very much and best regards,

-----Ursprüngliche Nachricht-----
Von: botan-devel-bounces at randombit.net
[mailto:botan-devel-bounces at randombit.net] Im Auftrag von Jack Lloyd
Gesendet: Mittwoch, 3. November 2010 19:52
An: Botan development list
Betreff: Re: [Botan-devel] Catching 'Botan::Decoding_Error'

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.
> (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).

botan-devel mailing list
botan-devel at randombit.net

More information about the botan-devel mailing list