06-18-2015 03:07 PM
I wrote an application a few years ago and used error ring constant in the code. It was to indicate to that a dynamic dispatch VI was not opened by a child class as intended. The I found a description from the included list, and it described the condition very well. That development was done in LV 2011 or even earlier perhaps.
Now after a mass compile to VL2013 SP1, my error code (400046 specifically) is undefined. I guess I expected error codes to have a continuous, none changing life once created. Any ideas why it is no longer recognized?
Solved! Go to Solution.
06-18-2015 03:38 PM
That is a bit odd, and I've never heard of an error code getting re-assigned or changed. Certainly if error 7 or 42 changed to another number you'd probably have a lot of angry LabVIEW developers. My first thought is maybe this is a custom error code from a toolkit that you don't have installed. But I wouldn't really expect an error specific to dynamic dispatch to be part of a toolkit.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-19-2015 08:00 AM
I thought about the missing toolkits after I posted my question. I have had my computer refreshed a few months ago, and still have a lot of toolkits and third party drivers that have not been loaded back on my machine. But I've loaded every toolkit and package that I can find that I thought could have an error code regarding dynamic dispatch/OOP, but no luck.
However, your comment made me curious... I'm familiar with error 7, but 42 didn't stick in my mind, so I went to Explain Error. Would this be what you expected to see for Error 42?
06-19-2015 08:28 AM
Maybe he meant error 43. Operation cancelled by user.
06-19-2015 08:32 AM
@RavensFan wrote:
Maybe he meant error 43. Operation cancelled by user.
I meant 42. I've often seen developers use it as a catch all for when they couldn't find an appropriate error code to use. If they re-assigned 42 to something like "Incorrect Password Entered" or something, then all those existing applications that rely on 42 to be the catch all would not return the correct error from the simple error handler.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-19-2015 08:58 AM
@Hooovahh wrote:
@RavensFan wrote:
Maybe he meant error 43. Operation cancelled by user.
I meant 42. I've often seen developers use it as a catch all for when they couldn't find an appropriate error code to use. If they re-assigned 42 to something like "Incorrect Password Entered" or something, then all those existing applications that rely on 42 to be the catch all would not return the correct error from the simple error handler.
Maybe they should use -41 instead.
06-19-2015 09:57 AM
Thanks for your input on this thread. I've opened a new one here with a boarder question with regard to custom errors. I'm wondering what is the best way to fix my problems now. I thought initially to replace all of my error rings with custom codes, but then where are these saved? Do they remain a ring defined in the code? Or are they saved off someplace I don't have access to them. I don't see them if I try to edit error codes through the Tools>Advanced>Edit Error Codes editor.
Please provide any expertise you may have there.
06-19-2015 11:17 AM
When I use error rings, I often pass the output through "Insert_PossibleReason_In_Error.vi".
If the error pertains to a file, I use "Insert_FileName_In_Error.vi"
Both are attached.
06-19-2015 12:46 PM - edited 06-19-2015 12:57 PM
all error codes are contained in a text file in <LabVIEW>\resource\errors\ or National Instruments\Shared\errors\ if you don't have to text file that contains that code it is undefined. this probably means that you're missing the tool kit that contains that error code or custom error file another developer of yours wrote. you would have to move that manually from version to version
In your case I would simply go to menu>>Tools>>Advanced>>Edit Error Codes...
Select New at the prompt and add you missing error. Close and reopen LabVIEW and your ring will have a defined error code.
When deploying to the user check the "Include custom errors" box in the installer.
06-19-2015 02:14 PM
Jeff,
Thanks for the input. With regard to the Error rings, how are those saved?
I've figured out the errors in the text files (with the exception of the installer check box, thx) now, but then there are the added steps for maintenance down the road with that route. Would I need to perform similar steps with Custom Error Rings? I'm not finding any information on how those are saved, and what is needed to transport those from developer to developer to ensure maintainability. Any insight on the details of that?
I'm trying to find out which direction to go is best before I fix the rest of my application.