06-19-2015 08:13 PM
Defined Error Codes such as seen here:
Are defined in the *_errors.txt files
This specific code is found in BOTH the LabVIEW WSN error text file and the UTF Error text file so it has two possible explainations. If The UTF Was not installed the second error code explaination would not be found. If Neither addon existed the explaination would be "An Undefined error" occured at......
Nicely with the error ring it contains the information of what Tool Kit the error belongs too.
DO NOT throw errors from toolkits the vi does not belong too! Just because you find a cool error code that makes sense does not mean your vi is a member of the module that owns the error.txt file! An analogy is using your friends credit card number. You are not your friend and soon, he may not be friendly towards you either, leaving you at the checkout counter with no valid credit and egg on your face. This is likely what you did.
At the bottom of the error ring range selector is "Custom Error"
This is a custom error it is saved in the vi not in an *_error.txt file Nifty: It can contain format specifiers! Errors in the error.txt files cannot.
So, what do you want to do?
A)Create a MyModule_error range
B)Use a "Custom error"
C)Abuse another module's error code
For A You create the error.txt file, and check this box:
For B You only need to have the vi installed
For C (Not Recommended) You need to track which module's errors you are using and include those modules in "Additional Installers" since those modules installers install their custom error code files
06-21-2015 11:08 PM
Thanks for all the extra time Jeff!
Your option B was the one I wasn't sure on some of the details. I suspected that is was simply saved in the VI, but couldn't find any verification to that fact elsewhere. Some of the specifiers are pretty cool too! I won't make the mistake of abusing someone else's errors in the future.
06-22-2015 07:13 AM
@JÞB wrote:
This is a custom error it is saved in the vi not in an *_error.txt file Nifty: It can contain format specifiers! Errors in the error.txt files cannot.
Oh come on, how have I never known this was a feature. I'd say this covers so many custom error code use cases. And you can choose to use an existing error code like 7 but then specify your own text.
A few things I did notice that I don't like is that %s doesn't accept a path like format into string does, you need to use the path to string first. And I noticed your custom text needs to be on a single line. Pressing return closes the dialog.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-22-2015 07:32 AM - edited 06-22-2015 07:36 AM
Okay one of the limitations I just mentioned was the multi line input issue. Where in the dialog you can't press enter or else it will close the dialog. But looking at the source of the XNode it looks like it should support a multi line input. So if you choose to copy text which has multiple lines, and then paste it into the dialog, it appears to work as expected.
I'm guessing this is a bug and should be brought to NI's attention.
And as for the other limitation, this too could be a bug. NI should be using the adaptive terminal inputs on the XNode, then the inputs will change based on the possible options going into the format into string where %s can mean a string, or path.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-22-2015 07:42 AM
Hooovahh wrote:And I noticed your custom text needs to be on a single line. Pressing return closes the dialog.
Use Ctrl+Enter and you will get a new line.
06-22-2015 07:45 AM
@crossrulz wrote:
Use Ctrl+Enter and you will get a new line.
Thanks, that certainly is easier than pasteing text, or editing XNodes.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-22-2015 01:57 PM
@Hooovahh wrote:
@JÞB wrote:
This is a custom error it is saved in the vi not in an *_error.txt file Nifty: It can contain format specifiers! Errors in the error.txt files cannot.
Oh come on, how have I never known this was a feature. I'd say this covers so many custom error code use cases. And you can choose to use an existing error code like 7 but then specify your own text.
A few things I did notice that I don't like is that %s doesn't accept a path like format into string does, you need to use the path to string first. And I noticed your custom text needs to be on a single line. Pressing return closes the dialog.
Path to String..... Relative or Absolute path to string or array of strings? Yes, the predominant would be Absolute to String (And make it cross platform) Perhaps you have an "Idea" there......
How you didn't know I can't speak to. It was covered well in the release notes for 2012 and nuggetized on these forums.
BONUS: "Right Click Explain Error" picks up the text on either the FP or the BD. Although Sadly, Menu>>Help>> Explain Error (My Custom Short-cut Ctrl+!) Doesn't pick up the BD text before 2014 I had asked for it as a Christmas present just after the 2012 release.
06-22-2015 04:30 PM
@JÞB wrote:
BONUS: "Right Click Explain Error" picks up the text on either the FP or the BD.
Now that one I use daily, only wish it worked on arrays of references, so I wouldn't have to copy out the error element so I could right click it.
I think I didn't notice the feature because I had (have) my own way of making custom error ring constants that find error codes in LabVIEW already. Guess I didn't think the error ring did much else other than that.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord