Re: Crash during throw_func()
- From: Murray Cumming <murrayc murrayc com>
- To: Matt Hoosier <matt hoosier gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Crash during throw_func()
- Date: Wed, 25 Oct 2006 17:40:55 +0200
On Wed, 2006-10-25 at 10:35 -0500, Matt Hoosier wrote:
> Good idea. What's the preferred way to handle situations like this:
>
> Handle::~Handle()
> {
> if(gobj())
> close(); // This may throw an exception
> }
>
> There's not really an opportunity to pass back the auto_ptr<exception>
> in this case. Should we just do:
>
> Handle::~Handle()
> {
> if(gobj())
> {
> std::auto_ptr<Gnome::Vfs::exception> error;
> close(error);
> }
> }
>
> and ignore the fact that the error may be set?
I think that's the only way. I can't see how we could do anything else
during a destructor.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]