In Java, any errors/exceptions that a function can throw (to its caller) are listed directly in its signature/declaration. This would be nice functionality to have in LabVIEW. Otherwise, the only way to determine which errors a VI can return is to either:
Neither of these options seems particularly robust or efficient.
It may even be possible for LabVIEW to determine the throwable errors automatically, although at least having the ability to declare them manually would be a good start. They could be registered through the development environment such that they are stored in the VI file itself. In this way LabVIEW could summarize all the errors a given VI throws based on those declared within it and its subVIs. I acknowledge that this would likely require a more sophisticated error system than the current error codes (since these may not be known at compile time). But, I would be surprised if it couldn't be achieved in a similar fashion to Java where all errors are classes that inherit from a common "error" class.
If I'm missing some methodical, pragmatic approach for achieving the same result, please let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Duplicate of https://forums.ni.com/t5/LabVIEW-Idea-Exchange/List-every-error-code-a-function-can-give-out/idi-p/1...