Boost logo

Boost Users :

Subject: Re: [Boost-users] Exception handling inside a dll
From: Roland Bock (rbock_at_[hidden])
Date: 2008-10-06 14:26:20


Hi Matthew,

just to be thorough: Visibility issues can also occur with MS Visual
C++. It is not a "speciality" of gcc, although the command line flags
might be different, of course (I wouldn't know about that).

If you're compiling with visibility=hidden (or the MS equivalent), then
I would expect the problem you described (not being able to catch an
exception is exactly what happened to me).

Not running into exceptions is also a good solution, though :-)

Regards,

Roland

Matthew LaCrosse wrote:
> Thank you Roland. I haven't tried compiling with gcc yet. I'm using MS
> Visual C++ 9.0.
>
> What I ended up doing was just writing a filter to block the invalid
> expression that was causing the crash.
>
> On Mon, Oct 6, 2008 at 2:16 AM, Roland Bock <rbock_at_[hidden]
> <mailto:rbock_at_[hidden]>> wrote:
>
> Hi,
>
> I had a similar problem a few weeks ago with catching an exception
> from boost::threads. It had to do with symbol visibility (I am using
> the gcc compiler flag -fvisibility=hidden), see
>
> http://lists.boost.org/boost-users/2008/09/40268.php (problem
> solved/circumvented)
> http://lists.boost.org/boost-users/2008/09/40270.php (additional
> insight)
>
> I have also seen a trac ticket regarding this issue for many parts
> of boost, including regex:
> http://svn.boost.org/trac/boost/ticket/2114
>
>
> Regards,
>
> Roland
>
>
>
> Matthew LaCrosse wrote:
>
> Yes, I tried that.
>
>
> On Sun, Oct 5, 2008 at 6:32 AM, Boris <boriss_at_[hidden]
> <mailto:boriss_at_[hidden]> <mailto:boriss_at_[hidden]
> <mailto:boriss_at_[hidden]>>> wrote:
>
> On Sun, 05 Oct 2008 01:45:11 +0200, Matthew LaCrosse
> <mlacrosse3_at_[hidden] <mailto:mlacrosse3_at_[hidden]>
> <mailto:mlacrosse3_at_[hidden] <mailto:mlacrosse3_at_[hidden]>>> wrote:
>
> It's not catching the exception in the C++ code. Could
> this just
> having
> something do with using the std::string class for the
> regex inputs?
>
>
> I've no idea why a C++ exception shouldn't be caught in C++ code.
> Did you try catch(...) to test if this works at least?
>
>
> Boris
>
> [...]
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> <mailto:Boost-users_at_[hidden]>
> <mailto:Boost-users_at_[hidden]
> <mailto:Boost-users_at_[hidden]>>
>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden] <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden] <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net