Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > C++ exception handling

Thread Tools

C++ exception handling

Jorgen Grahn
Posts: n/a
On Sun, 16 Dec 2007 18:16:30 +0200, Nikos Hatzigiannakis <(E-Mail Removed)> wrote:
> I am trying to understand how to use an exception handler to heal from a
> given exception, and not just display a message!

> Since an exception is raised the control of the program is transferred to
> the proper catch clause. What can we do after displaying a message to
> continue the normal operation of the program?

The same things as if you passed an error code back instead of
throwing an exception.

The main difference is, I guess, if you use exceptions you can design
your code to handle cleanup automatically, as the exception floats up
the call chain towards the catch clause.


// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/> R'lyeh wgah'nagl fhtagn!
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
signal handling and (structured) exception handling Peter C++ 34 10-17-2009 10:03 AM
python list handling and Lisp list handling Mark Tarver Python 22 04-26-2009 09:36 PM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
SoapExtension for Global Exception handling; but prevent exception from propagating!! VSK ASP .Net Web Services 0 07-29-2003 05:39 PM