Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
- Posts: 5
- Joined: Fri Nov 08, 2013 11:20 am
If I set the Return Code Variable in a Native Command task and the task is set to call a module if the program errors I am seeing a value of 0 in the variable but the log is showing a return code of the number I passed back from the executable. Is this by design? To get the return code in the variable do I have to have the task not route to my error module (On Error), but test for a value other than 0 in the return code variable and then call my error module?
- Posts: 592
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
Your best bet in this situation is to do just that ...
Test your return code (ie, you're defining an error, not the system) then execute accordingly.
Remember, the OnError will set based on there being an issue with the execution of the task. If you're telling it there's an error (based on some value or generated return code) and the task is still executing as designed, then the OnError wouldn't trigger in this case.
Immediately following the exec task, put a condition to test the return value and then call the Error Module from there if indicated.
Lead Solutions Consultant
Return to “Community Forum”