From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
whyDoINeedAnAliasDamnIt

Embedded Error Case Frame Option

Writing good code typically involves spending a lot of time coding up error handling cases.

Dropping error cases around enumerated or string controlled cases is a common structure task.

This takes up quite a bit of diagram space and coding time when integrated over the entire job.

 

If an enumerated or string controlled case structure could have an optional terminal dedicated for the error data type only, this structure could be more efficient to code.

 

A typical implementation looks like this:

 

Standard Error Structure.png

 

My proposed structure would look like this:

 

Embed Error Structure.png

 

Cheers.

Ray M.

4 Comments
tst
Knight of NI Knight of NI
Knight of NI
Darren
Proven Zealot
whyDoINeedAnAliasDamnIt
Member

I disagree that this is a duplicate of "Multiple Case Selector"

Multiple Case Selector is problematic in that it requires a priority protocol of some sort.

My proposal always gives priority to the Error input.

It's a regular polymorphic case structure except with a special case for errors.

Very simple logic paradigm and quite useful for error trapping tasks.

AristosQueue (NI)
NI Employee (retired)

> Multiple Case Selector is problematic in that it requires a priority protocol of some sort.

 

Yours is a duplicate insofar as it proposes one possible way to resolve the priority protocol. If we were going to explore any variation along these lines, the whole conversation about multiple ? terminals would have to be held.