Afficher un message
Vieux 15/10/2007, 13h04   #5
Nick Keighley
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: efficient exception handling

On 15 Oct, 11:17, Erik Wikström <Erik-wikst...@telia.com> wrote:
> On 2007-10-15 09:44, terminator wrote:


<snip>

> > 1.default:

>
> > The 'default' keyword can be introduced as an acceptable parameter to
> > the 'throw' statement as the uncatchable(unhandleable) exception which
> > cannot be cought by any catch block except the implicitly defined
> > default handler ,so that a 'throw default' performs a secure exit on
> > current thread:


<snip>

> The whole idea behind exceptions it that they can be thrown and then
> caught, why would anyone want an uncatchable exception? If you want to
> terminate the program there are other ways to do so, such as abort().


destructors. You might want to leave things in a "safe" state before
you
terminate the program. Close the working file. Release the database.
Turn off the heat in the cat cracker.


--
Nick Keighley

  Réponse avec citation
 
Page generated in 0,05053 seconds with 9 queries