Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Re: Catching ex...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 10 Topic 45813 of 46738
Post > Topic >>

Re: Catching exit code before program termination

by titanandrews <titanandrews@[EMAIL PROTECTED] > May 8, 2008 at 12:47 PM

On May 8, 2:30 pm, Martin York <Martin.YorkAma...@[EMAIL PROTECTED]
> wrote:
> On May 8, 9:05 am, titanandrews <titanandr...@[EMAIL PROTECTED]
> wrote:
>
> > Does anyone know if this can be done?
>
> Yes. But not that way.
> If you bring up cmd.exe
>
> run the application in cmd.exe
> Then you can print the exit code via the variabel %ERRORLEVEL%
>
> <command>
> echo %ERRORLEVEL%
>
> If you want to do it automatically just wrap it all in a small script
> that runs the code and then prints %ERRORLEVEL%
>
> On Unix/Linux systems you can do the same thing.
> The exact code depends on what shell you are using:
>
> In tcsh
> ./<COMMAND>
> echo $?

Thanks. But thats after the process has ended. By then, it's too
late. :(
 




 10 Posts in Topic:
Catching exit code before program termination
titanandrews <titanand  2008-05-08 09:05:09 
Re: Catching exit code before program termination
Sam <sam@[EMAIL PROTEC  2008-05-08 11:34:36 
Re: Catching exit code before program termination
Sam <sam@[EMAIL PROTEC  2008-05-08 11:44:26 
Re: Catching exit code before program termination
Martin York <Martin.Yo  2008-05-08 11:30:47 
Re: Catching exit code before program termination
titanandrews <titanand  2008-05-08 12:47:53 
Re: Catching exit code before program termination
Rolf Magnus <ramagnus@  2008-05-08 23:28:02 
Re: Catching exit code before program termination
Joe Greer <jgreer@[EMA  2008-05-08 22:15:22 
Re: Catching exit code before program termination
titanandrews <titanand  2008-05-08 17:36:08 
Re: Catching exit code before program termination
Jerry Coffin <jcoffin@  2008-05-10 22:29:34 
Re: Catching exit code before program termination
kasthurirangan.balaji@[EM  2008-05-08 22:08:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 0:08:32 CDT 2008.