LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Ring changing code number?

Solved!
Go to solution

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?

0 Kudos
Message 1 of 18
(3,626 Views)

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.

0 Kudos
Message 2 of 18
(3,613 Views)

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?

 

Err42.JPG

0 Kudos
Message 3 of 18
(3,582 Views)

Maybe he meant error 43.  Operation cancelled by user.

0 Kudos
Message 4 of 18
(3,570 Views)

@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.

0 Kudos
Message 5 of 18
(3,564 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 18
(3,554 Views)

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.

0 Kudos
Message 7 of 18
(3,538 Views)

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.

 

"If you weren't supposed to push it, it wouldn't be a button."
Download All
0 Kudos
Message 8 of 18
(3,524 Views)

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.


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 18
(3,507 Views)

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.

0 Kudos
Message 10 of 18
(3,489 Views)