02-04-2013 11:38 AM
I would like to put a error handling VI in such subvi that contains all the custom error code and would convert the input error cluster to the corresponding error clsuter for the error code given. Is there a better way of doing the same thing? I am trying to convert the error cluster and pass it to the end of the program for the dialog to pop up.
02-04-2013 12:13 PM
Look at the LabVIEW help for the "Error Cluster from Error Code" vi that you have in your diagram. There is a link to "user defined error codes", which allows you to build a table of custom error codes, defining the various numeric ranges allowed in LabVIEw so that you don't conflict with predefines codes.
02-04-2013 12:19 PM
The error ring is your friend my good man.
02-04-2013 12:27 PM
@JÞB wrote:
The error ring is your friend my good man.
Hi, Jeff:
I'm curious - have you ever used this method (Tools»Advanced»Edit Error Codes) to integrate your error codes? I was wondering what the pros and cons would be.
Thanks!
02-04-2013 12:49 PM
Actually No I haven't. It is fairly straight forward though I've heard and the custom codes can be included with an installer.
I just don't write too many errors
02-04-2013 01:01 PM
We use custom error codes for our libraries and they are quite easy to implement. They are nice because you can give a more meaningful error message. The downside is that it is another thing to maintain. Also, the typedef for our error codes is a ring and so the value of the error rings in our code do not update automatically when you change the typedef.
02-04-2013 01:15 PM
@Mark_Yedinak wrote:
We use custom error codes for our libraries and they are quite easy to implement. They are nice because you can give a more meaningful error message. The downside is that it is another thing to maintain. Also, the typedef for our error codes is a ring and so the value of the error rings in our code do not update automatically when you change the typedef.
Another plus for the error ring! It integrates with the custom errors you define.
02-04-2013 01:59 PM
The error ring looks cool, but if I have a bunch of custom error codes that I want to manage using one subvi, I would have to create a case structure that contains these different error ring, since I can't put error ring in an array. Using a case structure with the error ring. Never used the error ring before, but would like to know more.
02-04-2013 02:03 PM
@jyang72211 wrote:
The error ring looks cool, but if I have a bunch of custom error codes that I want to manage using one subvi, I would have to create a case structure that contains these different error ring, since I can't put error ring in an array. Using a case structure with the error ring. Never used the error ring before, but would like to know more.
The error ring works with the customized errors. You just need to maintain your customer error files and the ring will work automagically. BTW, the error ring is new to LV2012.
02-04-2013 02:19 PM
cool. I will do that.