Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5099 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

For the purposes of the LastError value being updated, what actually constitutes a script step...

E.g. does an If enclosure constitute an error (if no one knows i'll run some tests my self).

[error thrown here]

If[ Get(LastError) > 0 ]

Exit Script[ Get(LastError) ]

End If

Does the script exist with the error thrown at [error thrown here] line or the result of the if clause??

Posted

Im aware of that : - i'm interested in what Get(LastError) would be storing at the point the script exits... would it be the step that threw the error or 0 as a result of the if script step executing successfully.

Posted

The IF never changes the last error - and so the last error will be saved ...

I created a simple script that tries to find an invalid value - returned Error Number 401 and then added your exact script steps (except that I set (a variable to the Error) - and the variable held 401 at the end. Are you trying to store the last error? My understanding is that the script result will only really be valid if you run another script. I would store the error in a variable called $ERROR (global variable) so I could check it out (FM Advanced).

Posted

Thanks Comment,

It seems a bit retarded that things like show custom dialog and set variable would clear the last error state ... as far as i know they don't throw any error's.

On the up side, at least script exits with no user notificatoin become simpler ... and for anything else i suppose we'll just continue storing the error in a variable inside the construct.

This topic is 5099 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.