Re: What's finally keyword good for?
- From: "Christophe Lephay" <christophe-lephay@xxxxxxxxxx>
- Date: Mon, 8 Dec 2008 20:47:07 +0100
"Ollis" <No@xxxxxx> a écrit dans le message de groupe de discussion : DDDD1EAE-29A2-4C51-8FB4-7112A4456935@xxxxxxxxxxxxxxxx
"Peter Morris" wrote:
> private void something()
> {
>
> try
> {
>
> }
> catch
> {
>
> }
>
> /// This is the *finally* code from this point. One may check > conditions
> at
> this point, but what happens here is the *finally*.
>
> }
private void something()
{
try
{
}
catch
{
throw now Exception("Oh no it isn't!");
}
}
:-)
It's called poor programming, and one did not know what the abort conditions
were out of the gate. It shouldn't happen that one doesn't know the abort
conditions and what to do on a try/catch, IMHO.
Catching all exception in the first place was poor programming at a higher magnitude and if you don't catch all of them, your code is not anymore equivallent to a finally block.
.
- Follow-Ups:
- Re: What's finally keyword good for?
- From: Ollis
- Re: What's finally keyword good for?
- References:
- What's finally keyword good for?
- From: K Viltersten
- RE: What's finally keyword good for?
- From: Ollis
- Re: What's finally keyword good for?
- From: Peter Morris
- Re: What's finally keyword good for?
- From: Ollis
- What's finally keyword good for?
- Prev by Date: Re: A good .net obfuscator
- Next by Date: Re: SQLBulkCopy CLass - For Updates?
- Previous by thread: Re: What's finally keyword good for?
- Next by thread: Re: What's finally keyword good for?
- Index(es):