From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-20-2013 01:34 PM - edited 02-20-2013 01:36 PM
I have the "Copy error code files" checked for my application build specification but when I run my EXE on a different computer and call the simple error handler, I don't get the custom error from my computer's
C:\Program Files(x86)\National Instruments\LabVIEW 2012\user.lib\errors\User-errors.txt file. Instead I get the "this error code is undefined" explaination.
I've also tried including that file in the "always included" section of the build spec but that didn't work either. Am I missing something?
02-21-2013 02:43 PM
Infinite,
Check out this link:
http://www.ni.com/white-paper/3209/en
Specifically this paragraph:
"When building an executable (EXE) or shared library (DLL) with the Application Builder, make sure to add the custom error file as a support file (under the Source Files tab). For an executable, the custom error file will be saved in the <executable destination directory>\user.lib\errors directory. For a shared library, the custom error file will be saved in the National Instruments\Shared\LabVIEW Run-Time\<version>\Errors directory. When distributing a shared library, make sure to install the custom error file in this directory."
02-21-2013 03:17 PM
02-21-2013 05:49 PM - edited 02-21-2013 05:50 PM
That is correct. I am not using an installer. I would like to "copy error code files" so that they are built into the EXE. It's simpler if I don't have to hand out installers everytime I want to patch an EXE. Also, I'd just generally like to know what that checkbox in the build spec properties does.
02-21-2013 07:00 PM
02-21-2013 07:18 PM
So the check box only applies to installers not the application? I think that was the source of my confusion. I was hoping the EXE would look in it's local builds folder which is where the application builder puts the error file if you use the "always include" option.
02-21-2013 07:29 PM
02-25-2013 11:05 AM
I was expecting that since I'm using the new error rings, the appliction builder would hard code the error message into the exe. Alternatively, since I used the "always include" option, the exe could check the data folder for my error code file. Either of those options would be preferable to always needing to distribute an installer and installing a new version every time I wanted to update my application.
02-25-2013 11:17 AM
There is no mechanism for embedding an external file into an exe. If you want to have them as part of the exe, then you can do like the white paper above where it explains how to pass custom codes and messages to the general error handler.
The exe does check the appropriate folder for the error code file.
I don't understand your objection. You can create one installer for the initial installation of the exe, run time, and all of the other files. Then your updates can be just the file(s) that changed.
02-25-2013 11:38 AM
I don't think its unresonable for me to expect that since the text is visible on the block diagram that the text is somehow embedded in the source/exe.
If I add an error code, I don't want tell users where to put my new error file or give out a new installer.
I like the general error handler idea but it makes errors with custom text (ie "Com port %d failed") tricky.
Since one of these two methods work well without an external file, there's clearly some mechanism of embedded error info into the source code.