What's the difference between "Shell.ErrorCode" vs "Shell.ExitCode"?

Hi,
What is the difference between “Shell.ErrorCode” and “Shell.ExitCode”?
Thanks

Hi,
IIRC, one is for API1 and the other is for API2. I’m almost sure they do the same. Do you see both at the same time? Where?

I use the first one everywhere in my code but I accidentally came across the second one (ExitCode) in the Xojo doc. But yes, I also think that they are doing exactly the same thing.

If you were already using API1 or used examples from it, it makes sense: you started using ErrorCode (API1) and now you’re discovering the API2 version (yes, the documentation only mentions ExitCode, which is API2).

Do your future self a favor and stick to all API-1 syntax unless you are completely updating your project(s) to API-2. Using consistent syntax will keep you from pulling your hair out in 2 years.

Also, on that odd scenario where you need to go back to a pre-API-2 IDE, you’ll not get hit with unexpected errors.