Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

General Error Handler VI

NI LabVIEW 8.6 Help
June 2008

NI Part Number:
371361E-01

»View Product Info

Owning Palette: Dialog & User Interface VIs and Functions

Installed With: Base Package

Indicates whether an error occurred. If an error occurred, this VI returns a description of the error and optionally displays a dialog box.

[user-defined descriptions] is an array of descriptions of user-defined codes. If an incoming error matches one in user-defined codes, the VI returns the corresponding description from user-defined descriptions in message.
[user-defined codes] is an array of numeric error codes you can use to define error codes and messages for your own VIs. The VI searches this array after searching an internal database of error codes. Error codes 5000 through 9999 and -8999 through -8000 are reserved for you to define your own error messages.
[error code] is a numeric error code. If error in indicates an error, the VI ignores error code. If not, the VI tests it. A nonzero value signifies an error.
[error source] is an optional string you can use to describe the source of error code.
type of dialog determines what type of dialog box to display, if any. Regardless of its value, the VI outputs the error information and message describing the error.
0No dialog—Displays no dialog box. This is useful if you want to have programmatic control over handling errors.
1OK message (default)—Displays a dialog box with a single OK button. After the user acknowledges the dialog box, the VI returns control to the main VI.
2Continue or stop message—Displays a dialog box with buttons, which the user can use to either continue or stop. If the user selects Stop, the VI calls the Stop function to halt execution.
3OK message with warnings—Displays a dialog box with any warnings and a single OK button. After the user acknowledges the dialog box, the VI returns control to the main VI.
4Continue or stop message with warnings—Displays a dialog box with any warnings and buttons, which the user can use to either continue or stop. If the user selects Stop, the VI calls the Stop function to halt execution.
error in describes error conditions that occur before this VI or function runs.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
[exception action] is a way for you to create exceptions to error handling. The VI performs the exception action if the error code and error source match the exception code and exception source. If you do not wire an exception source, only the exception code must match for the VI to perform the exception action.
0No exception (default)—Performs no error exception handling, even if you wire an exception code or an exception source.
1Cancel error on matchTreats what is normally an error as no error. If the VI cancels an error, error? is FALSE, code out is 0, and source out is an empty string.
2Set error on match—Upgrades a warning to an error. This parameter sets an error if the VI detects no error, as described in the status and error code parameters, but the code value of error in matches exception code and the error source value matches exception source. If the VI sets an error, error? is TRUE, code out is the code value from error in, and source out is the source value from error in.
[exception code] is the error code that you want to treat as an exception. The default is 0.
[exception source] is the error message that you want to use to test for an exception. The default is an empty string.
error? indicates whether an error occurred. If this VI finds an error, it sets the parameters in the error cluster.
code out is the error code indicated by error in or error code.
source out indicates the source of the error. The source out string is a more descriptive string than the source string in the error in input.
message describes the error code that occurred, the source of the error, and a description of the error. If the VI does not return a description of the error, you can take several actions to find the error code description. If more than one description exists for the same error code, the VI displays all the descriptions, separated by or.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit