Re: try finally Error Handling without catch
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Wed, 18 Jan 2006 22:46:47 -0000
A.M-SG <alanalan@xxxxxxxxxxxxxxxx> wrote:
> I underestand that we can use try finally without catch clause. Something
> like this:
> try
> {
> throw new Exception("Test")
> }
> finally
> {
> // close all files
> }
>
> What exactly is this?
It means that the finally block is executed whatever happens, but any
exceptions thrown in the try block are still propagated up the stack
(rather than being caught).
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: try finally Error Handling without catch
- From: A.M-SG
- Re: try finally Error Handling without catch
- References:
- try finally Error Handling without catch
- From: A.M-SG
- try finally Error Handling without catch
- Prev by Date: Re: \n\r in text box
- Next by Date: Re: maximum .net process can use
- Previous by thread: Re: try finally Error Handling without catch
- Next by thread: Re: try finally Error Handling without catch
- Index(es):
Relevant Pages
|