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

Gregor Schraegle gregor.schraegle at gmx.de
Tue Nov 16 09:09:30 EST 2010


Dear Jack,

I am still encountering the same problem, that when a Botan::Decoding_Error 
exception is thrown in the Botan library, my calling application is 
terminated.

What I did in the meantime:
1. compiled the Botan 1.8.11 sources on Windows XP with the mingw gcc 
compiler with the option -fexceptions into libbotan-1.8.11.dll
2. I linked the libbotan-1.8.11.dll to may main routine (C++) 
That means I am not using the libbotan.a static library but the dynamic 
libbotan-1.8.11.dll

Do you think there could be a problem in how I access the library functions 
as
a dll and not as a shared library?

Or do you have any other ideas, what could cause this error?

I would appreciate any help very much!

Best regards,
Gregor




-------- Original-Nachricht --------

>             
> Datum: Wed, 3 Nov 2010 15:52:35 -0400
> Von: Jack Lloyd <lloyd at randombit.net>
> An: Botan development list <botan-devel at randombit.net>
> Betreff: Re: [Botan-devel] Catching 'Botan::Decoding_Error'
> 
>             
> Ah, OK. I don't think the different runtimes would be a problem, then,
> as far as I know this only affects VC++ (or perhaps also Intel C++ on
> Windows, I'm not sure about that).
> 
> I assume you built libbotan.a also with MinGW? Which GCC version are
> you using? I've seen a couple of blog posts suggesting using
> -fexceptions, which I would have thought was the default already, but
> perhaps not with MinGW?
> 
> On Wed, Nov 03, 2010 at 08:19:50PM +0100, Gregor Schrrrgle wrote:
> > 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,
> > Gregor
> > 
> > -----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.
> > 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
> > _______________________________________________
> > botan-devel mailing list
> > botan-devel at randombit.net
> > http://lists.randombit.net/mailman/listinfo/botan-devel
> > 
> > _______________________________________________
> > botan-devel mailing list
> > botan-devel at randombit.net
> > http://lists.randombit.net/mailman/listinfo/botan-devel
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://lists.randombit.net/mailman/listinfo/botan-devel
> 
        
-- 
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20101116/29891150/attachment.html>


More information about the botan-devel mailing list