10-22-2013 02:12 PM
Hi,
I have been trying to write a good error handler (i.e. not one that just sends all errors through the application) but I have not been able to find information regarding what error codes specific VI's can throw. I've searched the forum, and googled but haven't found anything about this.
What I want is something similar to the .NET documentation regarding exceptions.
For example, by looking in the documentation for StreamReader.Read.ReadAsync() I immedeately knows which exceptions the method throws and then I can handle them directly when I get the error. In LabVIEW I do it with trial and error; see what errors I get during testing, and then take care of them. Surely there must be a better way of dealing with this problem?
I know there are pages in the help for error ranges and such, but I want to know what errors specific VI's throw. Does such documentation exist for the LabVIEW VI's?
Best regards
Anders
Solved! Go to Solution.
10-22-2013 02:38 PM
Short answer is no. See related discussion http://forums.ni.com/t5/LabVIEW/How-to-show-all-possible-errors-generated-by-a-given-VI/td-p/2159524
10-22-2013 02:45 PM
Thank you for the quick answer (and sorry for missing that post when I searched through the forums).
10-22-2013 03:08 PM
nathand response is correct that you will never be able to figure out alll of the Errors a VI can generate without digging deep into the VI. but you can always check for the categoric Errors a Labview function can output. I'm assuming you are talking about the Labview provided functions and VIs here.
In labview 2012 and later you can see the error related to each category by placing a Error Ring, found in the Programming>Dialog and User interface Pallet. Drop down the ring to open a window which will show you all the different categories.
For example if you are using a IMAQdx function, you can find all of the errors that relate to IMAQdx. Obviously you could always have a error caused by IMAQdx not being licensed, and this wouldn't fall under the IMAQdx error category.But generally if you are setting up error handling in you Program you only worry about recovery from errors that are caused during use, for example a camera being disconnected. which this way you can located very simply.
Hope this helped,