🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #738

Re: Exception Specifications

#738
From: Andrew Koenig
Date: Fri, 02 Oct 1992 19:02
17 lines
1165 bytes
In article <1992Oct2.125244.14614@jyu.fi> sakkinen@jyu.fi (Markku Sakkinen) writes:

> The handler has no way to know when it has to delete the exception object,
> short of there being a quasi-Boolean field 'delete_me' in Exception.
> Thus:

> struct Exception { int delete_me; };
> throw new Exception (1);
> Exception ex (0);
> throw ex;

These problems do not occur if you throw objects (rather than pointers)
and catch references.  In that case, the implementation takes care of
deleting things at the proper time.
-- 
				--Andrew Koenig
				  ark@europa.att.com
Technical Details
Message-ID: <23785@alice.att.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!stanford.edu!agate!spool.mu.edu!wupost!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!ark
References: <5035@holden.lulea.trab.se> <1992Oct1.151052.7595@jyu.fi> <9227620.2176@mulga.cs.mu.OZ.AU> <1992Oct2.125244.14614@jyu.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!stanford.edu!agate!spool.mu.edu!wupost!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!ark
From: ark@alice.att.com (Andrew Koenig)
Newsgroups: comp.std.c++
Subject: Re: Exception Specifications
Message-ID: <23785@alice.att.com>
Date: 2 Oct 92 19:02:13 GMT
Article-I.D.: alice.23785
References: <5035@holden.lulea.trab.se> <1992Oct1.151052.7595@jyu.fi> <9227620.2176@mulga.cs.mu.OZ.AU> <1992Oct2.125244.14614@jyu.fi>
Reply-To: ark@alice.UUCP ()
Organization: AT&T Bell Laboratories, Murray Hill NJ
Lines: 17