I have a script that does the following:
The function returns a FA_errno of -3, which is fine because I was using the ObjectValid method to iterate through the paragraphs so eventually the object will be invalid. My problem is that I cannot override the error code after I exit that funciton. The FA_errno stays set to negative 3. Am I missing something or are there situations that forbid you from overriding the error code?
The relevant code is as follows:
var vFlowArray=new Array();
getPgfList (vFirstPgf, vFlowArray);
//due to getPgfList function, the FA_errno is -3 so i am going to overwrite the code
//a bunch of stuff occurs in the while condition but i am not showing it because this never evaluates to true
function getPgfList (pPgf,pArray)
I've reproduced this bug on my own machine. In fact, in my limited testing, I did not find any situations where I could explicitly initialize FA_errno. Hopefully this gets fixed soon.
A workaround, admittedly not the most elegant, could be to call a method with no side-effects that will reset the code for you, e.g.,
app.GetNamedMenu("!MakerMainMenu"); //If this fails, you've got bigger problems