Article View: comp.std.c++
Article #566Re: Question about exception handling
From: Michey Mehta
Date: Tue, 30 Oct 1990 22:07
Date: Tue, 30 Oct 1990 22:07
21 lines
1086 bytes
1086 bytes
Hi, Looking at the ARM again, I realize that what it says is clear. A sequence such as: base* object = new derived; throw(*object); Should behave like this: base* object = new derived; base tmp_object = *object; //will invoke copy constructor for base throw(tmp_object); This throw will be caught by a catch(base). If the user wants to use polymorphism, then a pointer should be thrown and the catch clause should be "catch(base*)". Michey Mehta Hewlett-Packard California Language Lab. Internet: mnm@hpda.hp.com Phone : (408) 447-5740 UUCP: ...!hplabs!hpda!mnm
Technical Details
Message-ID:
<60060002@hpclove.HP.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!samsung!usc!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpcc05!hpcuhb!hpcllla!hpclove!mnmReferences:
<60060001@hpclove.HP.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!samsung!usc!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpcc05!hpcuhb!hpcllla!hpclove!mnm From: mnm@hpclove.HP.COM (Michey Mehta) Newsgroups: comp.std.c++ Subject: Re: Question about exception handling Message-ID: <60060002@hpclove.HP.COM> Date: 30 Oct 90 22:07:04 GMT References: <60060001@hpclove.HP.COM> Organization: Hewlett Packard Calif. Language Lab Lines: 21