06-11-2009 06:58 PM
Here's a snippit on LabVIEW and .NET Exceptions
http://digital.ni.com/public.nsf/allkb/B15CE9F2715434C386256D3500601878
"In LabVIEW 8.0, more information was added to the error messages by
placing the .NET Exception Message property into the error source
string in the error cluster. By having this extra information, it is
easier to diagnose the root cause of the problem.
Note: In LabVIEW 8.0 and later, you will only receive the extra information if you use proper error handling."
My question:
What is "proper error handling"? Sure, I can put all my .NET code in a try-catch statement, but how should I best export .NET errors from my .NET class (in a DLL using LV's .NET interface tools) to LabVIEW's error terminals?
What I want is for my .NET exception to be caught and passed into LabVIEW directly into the error terminal.
Solved! Go to Solution.
06-11-2009 08:11 PM
06-11-2009 10:13 PM
I always hook up the error terminals properly, so I'm covered there.
But what do I need to do in my .NET program to properly tunnel the error out? Do I NOT use a try-catch and just let the code throw an exception?
If I have a method in a class...
public class Foo
{
public static void Bar()
{
throw new Exception("BlahBlahBlah")
}
}
...and I run Foo.Bar() from LabVIEW, will my exception get sent through the Method node's error terminals.
06-12-2009 09:45 AM