delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/12/16/01:07:18

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: Newbie - exception handling
16 Dec 1998 01:07:18 -0800 :
Message-ID: <Pine.SUN.3.93.981215185431.13987H-100000.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <000901be2801$dd6f4d90$862662cb AT tim-hughes>
Mime-Version: 1.0
To: Tim Hughes <tshughes AT voyager DOT co DOT nz>
Cc: gnu-win32 AT cygnus DOT com

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.

Regards,
Mumit

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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019