delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/12/08:40:56

From: david DOT stegbauer AT cz DOT opel DOT com
X-Lotus-FromDomain: GMCZECHIA AT EDSHUBEUROPE
Sender: david DOT stegbauer AT cz DOT opel DOT com
To: shinelight AT detroit DOT crosswinds DOT net
cc: djgpp AT delorie DOT com
Message-ID: <C1256751.0041E1C4.00@derumg01.cyberlink.eds.com>
Date: Mon, 12 Apr 1999 11:01:25 +0200
Subject: Re: Undocumented Keyword...
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com


Thomas J. Hruska wrote:
> As I was writing a program, I accidentally came across the following keyword:
>
> try
>
> Is this just a bug?  If not, what does 'try' do?  I can't figure this out.

'try' is C++ keyword. It is used in construct
try
{
}
catch(...)
{
};

to establish mechanism for catching run-time exceptions. It is *very* usefull
and hevily used in STL. The best explanation I've seen is in:
Bjarne Stroustrup: "The C++ Programing Language", ISBN 0-201-53992-6

David


- Raw text -


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