So I was looking at the idea submitted "Remove Common Error Functionality From Set/Unset Busy Cursor" and I came up with a more useful, and more generic way of dealing with that problem, and the problem of 'anchoring' code for flow-of-control in general.
I too use flat sequence structures to force flow-of-control, and there should be a better way. There is.
Suppose we simply add 'ignore error' functionality to the error-in/error-out terminals? In that manner you could create a vi just the way that you do now, with error in/out, but by right-clicking on error-in and selecting 'ignore error' the following would happen:
1. The VI would ignore a pre-existing error. It would run as if no error was present on error-in.
2. The error-in terminal would change color (or shape, or size, or relgion) so that it was visually obvious that the 'ignore error' functionality was enabled.
3. The error code passed to the VI, although ignored within the VI, would still be passed thru to error-out.
4. If the VI that was called with 'ignore error' generated an error, that error would still be added to the error codes output.
This hasTWO major benefits: (1) it provides a super simple way to create VI's that need to execute in order but don't need/want error functionality, without requiring the user to add unnecessary objects (like flat sequences) or write special code to use it; and (2) it allows you to write routines that should run regardless of whether an error is present or not, but still allows them to post an (additional) error if they need to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.