Hidden Gems in vi.lib

cancel
Showing results for 
Search instead for 
Did you mean: 

Share A Gem

vi.lib\Utility\error.llb\error code database.vi

error code database.png

I have found this vi useful for making informative error messages in my own error handling VIs. It grabs the explanation text as seen in help->explain error.

It also works with custom error codes (-8999 to -8000, 5000 to 5999, 500,000 to 599,999) if you register the error through Tools->Advanced->Edit Error codes.

_____________________________
- Cheers, Ed
Message 1 of 2
(7,752 Views)

Given that the internals of error handling in LabVIEW are subject to change, I'd recommend instead to use the 'message' output of the General Error Handler VI. It returns the same text as displayed in Help > Explain Error:

error_code.png

In other words, don't expect me to add Error Code Database.vi to the Hidden Gems palette any time soon.

0 Kudos
Message 2 of 2
(6,731 Views)