LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
sbus

Add 'ignore error' functionality to error-in: Allows flow-of-control and execute-even-if-there's-an-error functionality without requring flat sequences or special coding

Status: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.

So I was looking at the idea submitted "Remove Common Error Functional​ity 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.

3 Comments
sbus
Member

...like error handlers...

GregSands
Active Participant

The idea sounds appealing, but wouldn't it also require some way of linking the error-in and error-out terminals?  Perhaps you could right-click the Connector Pane and Add Error Terminals which would add a linked pair wired to the lower corners?

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.