Exit status not being identified from .EXE task - VisualCron - Forum

Community forum

GrahamG
2008-06-12T15:51:08Z
Dear Support,

We have an inhouse application written in .Net C# which is exiting on failure with -1, the function we are using is "Environment Exit"

However VisualCron keeps only errors with Arithmetic Overflow 77777.

If we change the exit code from -1 to something else, i.e. 1000, it works as expected and VC picks this up and gives the correct error description etc.

Is -1 correct in terms of what VC is expecting for a failure ? WHy would this cause VC to not identify it correctly ?


Thank you.


Graham


P.S. I am not the developer only the messenger, so apologies if my terminology is not 100%.

Support
2008-06-12T15:56:07Z
I did not know there as a -1 exit code. Do you have any Windows reference to that?

The reason why you see error 77777 is because VisualCron does not have the verbose error (or any record at all) of error -1. If this is a correct exit code we will add it to the database but please provide a reference for that.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
GrahamG
2008-06-13T10:01:54Z
Hi Support,

In a prior conversation we had sometime back we spoke about exit codes as I wanted to handle customer specific codes from a script, you pointed out that VC only supported the Windows codes and to refer to the file data\ExitCodes.xml in the VisualCron directories. This has does have -1 listed.

If I've misunderstood, would it be possible for VC support -1, as this is a 'common' code to represent a failure. I believe it is the std return for a failure in DOS programs.

I would like to be able handle a generic error return from a program which means "I've failed". This would cover a multidude of sins which are not covered by Windows event codes and have the exact reasons for failure in other logs files outside of VC.


Thanks in advance.



Graham


Support
2008-06-13T23:37:25Z
You are right. I just did not know there was a -1. And it exists. And it works. I tried creating a simple console application with Environment.Exit(-1) and the result in VisualCron was "Process aborted".

I guess your application fails before it comes to the Enviroment.Exit(-1) line.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2008-06-13T23:51:08Z
And you can edit the exitcodes.xml. Just remember to save it away when you are upgrading as the file is overwritten.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
GrahamG
2008-06-16T16:00:01Z
Hi Henrik,

Can you send me your source code example pls - we are still having problems with a .Net C# app.

I'll send you and email directly.


Thank you.


Graham
Support
2008-06-16T17:34:43Z
Sent to you now.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top