Boost logo

Boost Users :

Subject: Re: [Boost-users] [Test] prevent exceptions from beeing caught
From: John Wilkinson (jwilkinson_at_[hidden])
Date: 2010-04-28 09:25:02


Have you tried setting a catchpoint to stop execution when the exception is thrown? (http://www.delorie.com/gnu/docs/gdb/gdb_31.html)

John

> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Jan Rudoszanski
> Sent: Wednesday, April 28, 2010 2:28 AM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [Test] prevent exceptions from beeing caught
>
> Hi
>
> Thanks for your reply!
>
> >>     Is there any possibility for boost.test execution_monitor to not
> to
> >> catch exceptions thrown from code that I'm examining in a test case?
> >
> > Boost.Test does not prevent you from catching any exceptions. You can
> always say
> > 'catch throw' and it will stop at first exception being throw.
> >
> > Also I am not sure in general what do you expect to happened in case
> if
> > Boost.Test let's say do not catch your exception. How would it
> miraculously let
> > you know where exception comes from?
>
> It's not a miracle its a debugger I'm saying about. I said that
> before. Just as I can "catch" a system error in GDB when running my
> test program under it, I would like to let debugger care for my
> uncaught exception. In such case GDB points me to the exact place
> where this particular exception was thrown, and additionally I have
> full stack trace and I can inspect every variable. It's like you throw
> an exception from main, and don't have any "catch" statements (I use
> GDB for debugging, maybe other debuggers/OS'es behave differently?).
>
> > What I do recommend is to use Boost.Exception. These comes along with
> file+line
> > where it being thrown from.
>
> Good point. I'll tr it right away.
> Thanks
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
This e-mail message and any attachment(s) transmitted with it are intended only for the
use of the recipient(s) named above.This message may be privileged and/or confidential.
If you are not an intended recipient, you may not review, copy or distribute this message.
If you have received this communication in error, please notify us immediately by e-mail
and delete the original message.


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