LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error handling

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.  

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 17
(2,986 Views)

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.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 17
(2,973 Views)

1!.PNG

The error ring is your friend my good man.

 


"Should be" isn't "Is" -Jay
Message 3 of 17
(2,965 Views)

@JÞB wrote:

1!.PNG

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!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 4 of 17
(2,956 Views)

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 errorsSmiley Very Happy 


"Should be" isn't "Is" -Jay
Message 5 of 17
(2,947 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 6 of 17
(2,936 Views)

@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.


"Should be" isn't "Is" -Jay
Message 7 of 17
(2,927 Views)

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.

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 8 of 17
(2,906 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 17
(2,904 Views)

cool. I will do that.

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 10 of 17
(2,899 Views)