From: Klaus Nowikow (nowikow_at_[hidden])
Date: 2004-03-26 11:33:04
Reece Dunn wrote:
> A trick I use when handling HRESULT error codes is to have a
> class like this
> (adapted for int error type):
> class errorcheck
> inline errorcheck( int ec ): error( ec )
> if( ec < 0 ) throw( *this );
Careful. Throwing an exception from a constructor
means that the object won't be constructed (i. e., does not exist).
So you are throwing a non-existing object here.
Or am I wrong?
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk