ChrisStrykesAgain Posted November 27, 2019 Report Share Posted November 27, 2019 NI has established "user" error code ranges: -8999 through -8000 5000 through 9999 500,000 through 599,999. Unfortunately, I can't count the number of "error 5xxx" constants that I've seen. We should stop that; it leads to confusion at best. In an ideal world every developer or organization would have their own reserved error code ranges, but I accept that's not reasonable. That said, has anyone considered creating an informal list that organizations/individuals can publish their preferred error code ranges in? I think it might be useful. For example, if I'm at Company X and I see Company Y likes to use the range 501,000 to 501,999 then I'd probably choose not to use that range to avoid potential confusion to some extent. It wouldn't be fail-safe or enforceable, but I think it would be valuable; is anyone else on board with the idea? If so, we'd need to decide on where to publish them, but the LabVIEW Wiki would be one obvious choice in my opinion. Quote Link to comment
MikaelH Posted November 28, 2019 Report Share Posted November 28, 2019 We use 5000-5999 for project/application specific Error codes, and then different ranges for other common components. But for an instrument drivers, we might use one of the existing LV-error codes, and for that we use a small tool to find a good error code. ErrorCodes.vi Quote Link to comment
drjdpowell Posted November 28, 2019 Report Share Posted November 28, 2019 Note: if you have a Tools Network package, you can request assigned ranges of error codes for just your library. For example, "SQLite Library" errors start at 402860 1 Quote Link to comment
ChrisStrykesAgain Posted December 2, 2019 Author Report Share Posted December 2, 2019 On 11/28/2019 at 5:13 AM, drjdpowell said: Note: if you have a Tools Network package, you can request assigned ranges of error codes for just your library. For example, "SQLite Library" errors start at 402860 Are these ranges published, per chance? If not, I think this proposed wiki page might be a good repo for those as well (if the authors are willing to divulge). Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.