Re: Determining whether an applications has thrown some error ...
- From: "Peter Duniho" <no.peted.spam@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 05 Oct 2009 09:58:38 -0700
On Mon, 05 Oct 2009 04:57:14 -0700, Raj <Raj@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
How to determine that an application has thrown some error without using any
variables?
I need to execute a block of code only if there is no error. I know we can
set some flag and check the flag whether error is thrown or not ... whether
the CLR provides any mechasim without setting flags ...?
It depends on where the error happens and what type it is versus where you want to execute the code. If the error is an exception (as your use of the word "thrown" implies) you can put the code in a catch block and it will execute "immediately" after the error is thrown (depending on the rest of the code).
Otherwise, no. You'll just have to do things the "hard way".
Pete
.
- References:
- Prev by Date: Re: Access javascript variable from C# windows app
- Next by Date: Re: locking an int
- Previous by thread: Determining whether an applications has thrown some error ...
- Next by thread: Re: Determining whether an applications has thrown some error ...
- Index(es):
Relevant Pages
|