LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Library Design Question -- Communicating .NET exceptions to LabVIEW

LabVIEW currently does not support inspecting .NET exceptions.  It will catch the exceptions so LabVIEW does not crash, but only turns exceptions into a generic ".NET exception occured" error code (code 1172).  I hope NI will look into improving this in the future -- but this thread is about how to deal with this situation today. 
 
I have to implement some other way for LabVIEW users to get error information from my company's object-orientated .NET library.  From what I can tell, the most popular mechanism for other .NET library authors for LabVIEW is to implement a "last error" property.  If LabVIEW reports cod 1172, then the user can query the "last error" property.  (There are some threading issues, but I know how to solve those.)
 
My company's library is an OO-library where an application will create one parent object and all other objects are member sub-objects (no inheritance).  For example the parent object could be Car, and the member sub-objects would be Engine, Windshield, Tire, Radio, etc....  You create a Car, then have access to the car's internal objects.  (I hope that makes sense.)
 
So I have a couple of questions for LabVIEW users out there:
 
(1) Is there any preference as to how to implement the "last error" property?  Options I can think of include:
 
    - A single "last error" property for the parent object and all sub-objects accessible only from the parent object (Car in my example)
 
    - A single "last error" property for the parent object and all sub-objects accessible from each object (i.e. all sub-objects would have a "last error" property, but they would all access the same error information).
 
    - A "last error" property for each sub-object which would only get set by the methods and properties from that particular object.
 
    Personally, I'm in favor of one of the first two -- but then again, I'm not a huge LV user and don't have a compelling arguement from a LV user's perspective.
 
(2) Can you think of any better error reporting mechanism?  Or a better way to implement a "last error" property?
 
Thanks so much!
 
- Kevin Hall
 

Message Edited by ZMeson on 03-10-2006 12:46 PM

0 Kudos
Message 1 of 1
(2,328 Views)