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:
examine the code manually, recursing through all its subVIs or
brute-force exercise the VI until you have observed all errors that it might throw in your particular application.
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.