Newbie - exception handling

Mumit Khan
Tue Dec 15 17:07:00 GMT 1998

On Tue, 15 Dec 1998, Tim Hughes wrote:

> I have NT4 SP3,   egcs-1.1 and coolview.
> I am writing v. simple  trial programs & I am not yet sure whether any of "try"  "catch" "throw" "except"  "finally"   (all possibly with single or double underscore prefixes) are implemented.
> I have read stacks of mailing lists - could someone pls indicate a reference work, if any, to which the current implementations equate in terms of exception handling  (eg Stan Lippman's C++ Primer  edition 2 or edition 3)    ?

There is no "finally" and "except" in the C++ language, and hence neither
is implemented in GCC. There is only "throw" and "catch" and there are no 
underscores. If you want to use Microsoft's ad-hoc extensions, you need 
to use their compiler or implement it in GCC and contribute it to the FSF.

You should definitely get a recent book on C++ and possibly a book on 
STL if you're planning on writing any code in C++, and especially using
new'ish features that weren't there 4-5 years ago. I highly recommend the 
following combination as a good starting point:
  - C++ language and overview -- Bjarne Stroustrup 3rd edition
  - Standard Template Library -- Matthew Austern (Just out. An 
    excellent book for newbies and experts alike)

Stroustrup's book should give you pretty good idea of what C++ exception
handling is, what the keywords are, and how to use it.


ps: Please use an mail editor that (1) doesn't include HTML attachments, 
and (2) wraps long lines to <= 74 characters or so. The HTML crud is 
unnecessary, non-standard and downright annoying.

For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

More information about the Cygwin mailing list