euakem@euas10.ericsson.se (Magnus Kempe) (07/21/89)
How would one go about implementing exceptions in C++? I am particularly interested in the functionnality offered by Ada exceptions - or better.. - i.e. raising exceptions, and catching them, not necessarily in the same routine. If it is possible to do, is it: i) clean -- i.e. easy to understand and easy to use ii) portable -- i.e. independent of the machine *and* of the compiler iii) efficient -- i.e. not run-time overhead when no exception is raised If not possible, why? Is there a way to simulate it? Please e-mail to me, I'll summarize to the net. Thanks in advance, Magnus, euakem@euas10.ericsson.se Good Premises, -- Magnus euakem@euas10.ericsson.se
fsb@vitro.uucp (Steve Brailsford) (11/28/90)
I read somewhere there is some talk about including exception handlers in C++ like Ada has. Does anyone have any examples of what they might look like? Does it introduce new keywords? I assume it would use some kind of signal() function. Is there some new mechanism for doing it? I have done some C->Ada/Ada->C conversions and it would be a lot easier to go from ada to C++ if there were exceptions in the langauge. Maybe we can get the DOD to adopt the new C++ as a co-language to Ada. -- Steve Brailsford Usenet: uunet!media!vitro!fsb Vitro Corporation Compu$erve: 73427,1466 14000 Georgia Ave. Voice: (301) 231-1481 Silver Spring, MD 20906
jimad@microsoft.UUCP (Jim ADCOCK) (12/11/90)
In article <1990Nov27.203401.6093@vitro.uucp> fsb@vitro.uucp (Steve Brailsford) writes: |I read somewhere there is some talk about including exception |handlers in C++ like Ada has. Does anyone have any examples of |what they might look like? Does it introduce new keywords? |I assume it would use some kind of signal() function. Is there |some new mechanism for doing it? I have done some C->Ada/Ada->C |conversions and it would be a lot easier to go from ada to C++ |if there were exceptions in the langauge. Maybe we can get the DOD |to adopt the new C++ as a co-language to Ada. The ANSI-C++ committee has accepted the proposed model of exceptions presented in "The Annotated Reference Manual", Ellis & Stroustrup, Addison-Wesley 1990. As such exceptions can be considered part of the C++ language. Actual compilers supporting these exceptions will be forthcoming.