Boost logo

Boost :

From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-08-13 13:06:26


Well,

Assuming the internal exception mechanism destructs an object that was caught as a reference afterwards, there would be a problem in holding onto the std::exception&.

I'm sure the other guru's here can come up with a solution...
  ----- Original Message -----
  From: Eric Woodruff
  Newsgroups: gmane.comp.lib.boost.devel
  Sent: Tuesday, 2002:August:13 1:49 PM
  Subject: Re: Re: Re: Re: Re: AttemptingresolutionofThreads&ExceptionsIssue

  You would either:

  1) specify std::exception& because you want to use the abstract interface
  2) specify your error class

  where it would store either:

  1) an std::exception& which would have a reference to your error type
  2) an instance of your error class (copy constructed)

  ----- Original Message -----
  From: David Abrahams
  Newsgroups: gmane.comp.lib.boost.devel
  Sent: Tuesday, 2002:August:13 1:10 PM
  Subject: Re: Re: Re: Re: Re: Attempting resolutionofThreads&ExceptionsIssue

  From: "Eric Woodruff" <Eric.Woodruff_at_[hidden]>

> Could the user not specify std::exception& instead?

  Suppose they do.
  Now suppose I define and throw my own exception type:

  struct error : std::exception { char const* what() throw(); double
  x[3000]; };

  How is the exception-rethrowing mechanism going to store that?

  -----------------------------------------------------------
             David Abrahams * Boost Consulting
  dave_at_[hidden] * http://www.boost-consulting.com

  _______________________________________________
  Unsubscribe & other changes:
  http://lists.boost.org/mailman/listinfo.cgi/boost

  _______________________________________________
  Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk