Path: utzoo!mnetor!uunet!husc6!uwvax!oddjob!nucsrl!morrison From: morrison@eecs.nwu.edu (Vance Morrison) Newsgroups: comp.lang.c++ Subject: Re: Proposal for Exceptions for C++ Message-ID: <8180011@eecs.nwu.edu> Date: 2 Apr 88 18:11:08 GMT References: <8180006@eecs.nwu.edu> Organization: Northwestern U, Evanston IL, USA Lines: 26 Hello, This is in reply to Steve Maurer's suggesting on making exceptions look like functions. There are several problems 1) It does not allow more than one exceptions handler to be defined for a given exception. (if a given exception is declaired more than once, which one should it choose?) 2) MOST times, when an exception is raised, you want to return to the scope of a functions somewhere above you on the stack, how do you do this? (longjumps won't work since they do not call destructors properly) 3) Often you need access to variables that are in the scope of functions above you in the call stack to handle the error properly. How can you do this? In my mind, exceptions are FLOW OF CONTROL constructs. They allow you to 'goto' places out of your scope in a controled way. exceptions are not functions or data structures, they are more like fancy 'goto' statements. Vance Morrison Northwestern Univ.