Thread: Error
View Single Post
  #4   Spotlight this post!  
Unread 15-02-2011, 21:14
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Error

The primary use of error I/O is to declare what to do with errors. If a function can't complete, or runs into an issue with hardware or parameters, the error out will describe the error.

Error In is used for chaining errors. Error chaining is the LV way of saying that code is to be skipped if there is an error. If a node gets an error and is chained to four blocks, the next four blocks see the error and typically skip over their operation. A common exception is that Close blocks will operate anyway.

If you are familiar with exception handling in other languages, the error chaining is the dataflow version of throwing an exception. The difference is that the exception is thrown forward instead of back. This cooperates with making sure wires always have values, and it allows for the exceptions handling code to be defined for each block.

The fact that error handling also happens to be useful for sequencing is an added benefit, but you may in fact want to clear out the error if you want some code to run even if an error was produced upstream.

Greg McKaskle
Reply With Quote