Re: Determining whether an applications has thrown some error ...

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
.



Relevant Pages

  • Re: which book to start with...?
    ... The CPU *would* execute it, ... find that Nasm puts its name in a .comment section...). ... but i dont understand how the previous test will set the sign flag. ... Not a bad idea - I find Nasm's version of the instruction set reference useful, even though it isn't up-to-date. ...
    (alt.lang.asm)
  • Determining whether an applications has thrown some error ...
    ... How to determine that an application has thrown some error without using any ... I need to execute a block of code only if there is no error. ... set some flag and check the flag whether error is thrown or not ... ... the CLR provides any mechasim without setting flags ...? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Looping in MS SQL 2000 DTS
    ... i think this behaviour and your code is correct, only the flag does not ... 'Set oPkg = DTSGlobalVariables.Parent ... 'Do not execute task 2, ... times trough that should not really be a replacement for sleep. ...
    (microsoft.public.sqlserver.dts)
  • Re: Question regarding UNIX access() call
    ... (Solaris, e.g., has eaccess() ... and a secret "E_OK" flag which you can or in to the access flags) ... you can execute a program before you actually executed it. ...
    (comp.unix.programmer)
  • Re: File compatibility issues with LAN drive
    ... the application registered for that file extension. ... Windows did not have a file "executable" flag, ... So samba would default to setting the flag when writing a file ... execute the file on the Unix system on which the Samba server is running. ...
    (sci.electronics.design)