From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

capturing multiple errors

I thought that the Merge Errors would show me multiple errors (if they occurred).  However, after reading more closely, I realized that Merge Errors will 'report the first error found'.  I have a situation where there are 2 and sometimes 3 possible sources of error that I'd like to funnel into one Error Out and display all three errors.  Is this possible, or do I have to have an Error Out for each Error in.
0 Kudos
Message 1 of 11
(7,212 Views)
Mr bean,
I've attached a vi in V8.0.  Modify as needed.
0 Kudos
Message 2 of 11
(7,201 Views)
I'm not clear on what this code is doing.  Why are the Error Outs on the left?  What should I see as output?
0 Kudos
Message 3 of 11
(7,197 Views)

Basically, if there is an error in any of the three seperate error in's or the array error in, the front panel will be displayed allowing you to view all errors and giving you the choice to send them out or clear them.

 

Chris Co.

0 Kudos
Message 4 of 11
(7,195 Views)
So am I correct in that the answe to my original question is that you must have an Error Out for each Error source and that you can't somehow combine all error messages and display them in one Error Out?
0 Kudos
Message 5 of 11
(7,186 Views)

There is a Error array in that is error's bundled together.  This will let you combine all of your error outs from various VI's and build an array of them.

 

Chris Co.

0 Kudos
Message 6 of 11
(7,182 Views)
It's easy enough to combine all error messages (if you are talking about the 'source' element in the cluster). You just do an unbundle by name and concantanate all of the strings. Where you have a problem is that most of the error handling routines use the error code and there's no way to combine more than one error code in a single error out cluster. Depending on what you are doing, you could modify the simple or general error handler to accept an array of error clusters though.
Message 7 of 11
(7,177 Views)

Dennis,

The general error handler currently does handle an array of error clusters, however it only displays error information on the first error received in the array.  What I attached was an error handler that Prompts the user an error occured and allows the user to view all errors occured (provided the programmer arrayed the error clusters or wired the three seperate error clusters.)

Maybe I'm missing something, but I thought that was what he wanted.

Mr Bean,

Please, Let me know if I misinterpreted your request.

 

Chris Co.

0 Kudos
Message 8 of 11
(7,170 Views)

So the general error handler has been changed in 8.x? That's pretty nice and it sounds like what you provided would work well.


@Chris Co wrote:

Dennis,

The general error handler currently does handle an array of error clusters, however it only displays error information on the first error received in the array.  What I attached was an error handler that Prompts the user an error occured and allows the user to view all errors occured (provided the programmer arrayed the error clusters or wired the three seperate error clusters.)

Maybe I'm missing something, but I thought that was what he wanted.

Mr Bean,

Please, Let me know if I misinterpreted your request.

 

Chris Co.




0 Kudos
Message 9 of 11
(7,164 Views)

Hi mrbean,

      If you're still open to ideas, here are a couple of VIs - one for Building an error, the other for Merging two errors.  They will encorporate new error-info while preserving "existing" error-cluster information (even if it's non-fatal).  In the (relatively) rare instances where multiple error-clusters need to be merged, I just cascade the "binary"-merge!  Of course this isn't designed to address arrays of errors!

Cheers.

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Download All
0 Kudos
Message 10 of 11
(7,156 Views)