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

implement is_valid_ref.vi input validation for all classes #7

Open
jimkring opened this issue Jun 27, 2023 · 0 comments
Open

implement is_valid_ref.vi input validation for all classes #7

jimkring opened this issue Jun 27, 2023 · 0 comments
Assignees

Comments

@jimkring
Copy link
Contributor

jimkring commented Jun 27, 2023

Currently, Table.lvclass and Item.lvclass implement input validation of object references.

image

Here is how is_valid_ref.vi raises an error if it's optional raise error if invalid? (False) input is set to True:

image

This should be used throughout the class to validate the reference prior to calling the DLL.

For example:

image

Notice how we use it in the constructor(s) and destructor, too, in addition to the various get/set VIs in the class.

image

Also, be sure to validate any additional object/reference arguments passed into a method, in addition to the primary reference, as shown below:

image

@jimkring jimkring assigned jimkring and laurammiller and unassigned jimkring Jun 27, 2023
jimkring added a commit that referenced this issue Jun 28, 2023
implement is_valid_ref.vi input validation for all classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants