Jack,
Improved error handling is definately useful. But using error codes to specify what went wrong is somewhat limited. Oftentimes you would like to include runtime variables in the error. For example, when a function fails to open a file, including a path+filename as part of the error is helpful to the user. With error codes you are limited to generic error descriptions such as "could not open file" or "access denied".
This CAN be done at runtime by abusing the source field of the error cluster as a general purpose string. Resolve any error code to a string using the error code database and format any further explanation including runtime variables. Prepend that string to the source string of the error cluster. By marking such "explained" errors with a special error code, your error handler/logger/window can be signalled avoid further resolution and instead display the source string verbatim.
There are a couple of VI's in the "source/library/error handling" subdirectory of the LuaVIEW distribution that assist with doing so. The distribution is downloadable here: http://www.citengineering.com/LuaVIEW/download.html
The error handling VIs are self-contained (do not depend on Lua) and thus can be used with arbitrary LabVIEW code.
If you in addition wrap your LabVIEW code in Lua code, you can have an actual exception mechanism with all the corresponding advantages. For an explanation see: http://www.citengineering.com/luaview/manu...rror%20handling
---
Albert-Jan