LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to throw an exception from Labview to .net object?

thanks
Gabi
0 Kudos
Message 1 of 4
(2,758 Views)
I'm a little confused. Are you creating a LabVIEW DLL, or are you trying to call a .NET assembly in LabVIEW? If it's the former, LabVIEW does not create .NET assemblies, so you basically have to treat the LabVIEW DLL in your .NET application the same way you treat unmanaged code. In other words, try..catch blocks. If it's the latter, a .NET exception gets mapped to the error cluster, but you get error code 1172. The source string will contain more information about the exception (if you're running LabVIEW 8+), but it requires parsing to figure out the exception.
0 Kudos
Message 2 of 4
(2,752 Views)

Hi

I am using a .net dll in Labview. I receive exceptions from the .net dll, no problem.

I want to send an exception to the .net dll. Is there a way to do it ? (equivalent to throw exception in C#)

thanks

0 Kudos
Message 3 of 4
(2,735 Views)
I guess I would ask the question from a different angle. If you're using your .NET assembly from another .NET assembly (say a C# program), then how to you "send" an exception to your .NET assembly? Exceptions are thrown, and they bubble up until an appropriate handler is found. If I understand you correctly it seems like you're trying to bubble down, and I don't know how to do that with exceptions in .NET, regardless of LabVIEW.
0 Kudos
Message 4 of 4
(2,720 Views)