Path: utzoo!utgpu!water!watmath!clyde!att-cb!att-ih!ihnp4!inuxc!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c++ Subject: Re: Proposal for Exceptions for C++ Message-ID: <2495@bsu-cs.UUCP> Date: 29 Mar 88 21:21:11 GMT References: <8180006@eecs.nwu.edu> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 25 In article <8180006@eecs.nwu.edu> morrison@eecs.nwu.edu (Vance Morrison) writes: >A PROPOSAL FOR ADDING EXCEPTION HANDLING TO C++ ... >Thus if the error >is to be ignored (that is normal flow of control is to resume), the >programmer must explicitly say so by using the resume statement. The Ada designers chose not to allow execution of a block to continue after an exception occurred. The original Rationale actually gives an example of how to achieve this effect nevertheless: by invoking a procedure again if an exception occurs the first time. The reason for not allowing a "resume" or equivalent was (I guess) to avoid undue complexity in programs. Many exceptions can occur at unpredictable times (e.g. numeric overflow/underflow at any point during expression evaluation, I/O error in the middle of a block of data being written or read), and allowing resumption of the interrupted statement could be awfully risky. On the face of it, it also seems to make life more complicated for the compiler writer to allow a "resume" statement. This is something worth keeping in mind. -- Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi