Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct evaluation of xop error codes #32

Open
MichaelHuth opened this issue Jun 5, 2023 · 0 comments
Open

Correct evaluation of xop error codes #32

MichaelHuth opened this issue Jun 5, 2023 · 0 comments
Assignees

Comments

@MichaelHuth
Copy link
Member

MichaelHuth commented Jun 5, 2023

After some testing it turns out that the following way is working properly:

	variable err

	// for first loaded XOP -> xop error codes returned are in the range 10000+ upto max. 10999; error codes -1 to 9999 are Igor Pro error codes
	// for second+ loaded XOP -> xop error codes returned are offsetted by n x 0x10000 per XOP instead of 10000.
	// Therefore, returning the code through RTE and directly through V_flag (SetOperationReturnValue):
	err = err < 0xFFFF ? err : (err & 0xFFFF) + 10000
	// Note: Getting the error message through GetRTErrMessage, GetErrMessage(code) requires the original RTE code (does not work with directly return through  V_flag).

based partly on https://www.wavemetrics.com/forum/general/querying-xop-error-codes

Edited: Added (...) as + has higher precendence than &

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants