LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I report an active line number?

I've seen this used before, so I know it is possible. When I have a code failure I would like to be able to report an error trace to the operator, which includes the current line of code where the error occured. How can I obtain the current line number for code executing in CVI?
0 Kudos
Message 1 of 4
(3,296 Views)
Your looking for the __LINE__ macro.  there is also a __FILE__ and __FUNCTION__
0 Kudos
Message 2 of 4
(3,292 Views)
It works. Thanks.
0 Kudos
Message 3 of 4
(3,280 Views)
With regard to error reporting, here you can find some personal tips.
Also, take a look at this post that discusses the use of __FUNCTION__ macro in CVI8.5


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(3,233 Views)