Jump to content
Sign in to follow this  

Error handling

Recommended Posts

Thanks for the template JKI, great to see how others solve reoccurring problems in LabVIEW. And thanks for sharing.


The fact that the error handling is built into the template, is just one of the many items that strikes me as quite useful. A situation I come across frequently wrt errors in this kind of pattern involves running Macros, or any multiple state activity.


The template currently goes to the error handler case, displays the error, clears the error and then continues on running the remaining steps, starting with the error cleared. Sometimes this is exactly the behaviour I need, but sometimes I want to complete the remaining states but let them know an error happened, and mostly I just want to abort the remaining states (clear out the queue - since running them no longer makes sense due to an error).


Do you at JKI or do others run into this, and if so what approach(es) do you take to manage the different ways of operating?


I can think of several ways to *change* this (well I think I've got at least three different ways I do it!), but would like discuss this so I can select an approach that is *more preferred* or at least results from more of a consensus.


And like you indicate in your template, I may have some Post error work I always want to complete. That is handled nicely in the template.



Share this post

Link to post
Share on other sites

One addition about error handling, it might be usefull to extend the Parse State Queue in the following manner:


This way you now which state generated the error.

JKI:You have the info already available any specific reason not to output this?



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.