View Single Post
  #3   Spotlight this post!  
Unread 31-01-2010, 11:43
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: Question about errror data in the default program

Actually, the error handling in Begin is different from the rest of the project. Neither is wrong, and as with any language, error handling can be done in many ways and the selection is probably more style than conscious choice.

In this case, the Begin VI outputs an error which is wired to the other elements in Robot Main to make sure they don't start until Begin completes. In reality, there is no reason that the dependency has to be accomplished with the error wire, but this is a common pattern. The next thought is that if there is an error wire people may probe it as they debug. If Begin produces errors but doesn't propagate the error, this may lead to confusion. So Begin builds the array and propagates the errors whereas most of the rest of the template code relies on the auto error reporting and the console in the diagnostics screen.

To answer the original question, if you won't confuse yourself or others on your team, it is fine to eliminate the extra wires and build arrays. Or your group of programmers can decide that the info is useful and to build the array to pass out. The most important thing is to be consistent and avoid confusion.

Greg McKaskle
Reply With Quote