Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ncar!oddjob!nucsrl!gore From: gore@eecs.nwu.edu (Jacob Gore) Newsgroups: comp.lang.c++ Subject: Re: Proposal for Exceptions for C++ Message-ID: <8180010@eecs.nwu.edu> Date: 1 Apr 88 20:08:49 GMT References: <8180006@eecs.nwu.edu> Organization: Northwestern U, Evanston IL, USA Lines: 21 / comp.lang.c++ / steve@vsi1.UUCP (Steve Maurer) / Mar 31, 1988 / >What's wrong with doing this? ... >Example Of Use: ... >exception userfoobar /* a user defined exception */ >{ >counter--; >} Well, it's not that it's "wrong," but that it could be so much better. Exceptions can be objects in their own right. That would permit one to have sets, prioritized lists, whatever of exceptions. Your solution provides very inflexible exception handling. You are trying to make an exception handler look like a procedure. But in C, that makes it even more restrictive than the arrangement used in Ada: Not only are you restricting how exceptions can be organized, but you are also allowing for only one possible way to handle each exception! Jacob Gore Gore@EECS.NWU.Edu Northwestern Univ., EECS Dept. {oddjob,gargoyle,ihnp4}!nucsrl!gore