|
Synopsis
|
Parameters
Parameters |
value |
Meaning |
cat |
|
Catalog file without the extension cat, for example, "myErrors". The file is either the _errors.cat file located in <wincc_oa_path>/msg/<lang> or an own catalog file located in your project path <proj_path>/msg/<lang>. If you define an own error catalog, the error numbers in your catalog file have to be 5-digit numbers starting with 0, for example, 00001 (see also the example at the end of this page). Note also that if you have a multilingual project, the catalog file has to be located in each project language directory in <proj_path>/msg/<lang>. If you pass an empty string, the catalog _errors.cat in <wincc_oa_path>/msg/<lang> will be used. |
bit |
|
Internal, should be 0 |
prio |
|
Indicates the importance of the error. |
|
PRIO_FATAL |
Program is terminated |
|
PRIO_SEVERE |
Rescue measures required |
|
PRIO_WARNING |
Information for the user |
|
PRIO_INFO |
Information for the user for flow monitoring |
type |
|
|
|
ERR_IMPL |
Implementation error |
|
ERR_PARAM |
Configuration error |
|
ERR_SYSTEM |
System error |
|
ERR_CONTROL |
Control runtime error |
|
ERR_REDUNDANCY |
Redundancy error |
code |
|
Sequence number from the _errors.cat file in <wincc_oa_path>/msg/<lang> or number from an own catalog file in <proj_pfad>/msg/<lang>. |
man |
|
Manager where the error has been triggered. You can get an integer that corresponds to the manager identifier with the function convManIdToInt(). See also the second example at the end of this page. The manager identifier consists of replica (R), system number (S), manager type (T) and number (N) in the following format 0xRRSSTTNN. |
user |
|
Trigger of the error |
dp |
|
Name of the data point where the error occurred |
note1-3 |
|
Any textual details, optional parameter |
Return value
An error class. The returned error can be printed with the function throwError (see example below). |
Errors
Description
The function makeError is used to catch an error and show an error or information message from an error catalog. The error message or information will be shown through the throwError function. |
Example |
This example obtains a data point value with the dpGet function and checks if the get value is within a specified value range. The check will be made by means of a switch or case structure. If the value is not within the value range, an own information message from an own catalog file will be displayed. The error (value is not within the value range) is caught with the makeError function and the information message is shown through the throwError function. The error catalog used in this function is shown in the figure below. |
Figure: myError.cat
You can also use the other alternative of the makeError function. This alternative, however, only allows using the _errors.cat catalog in <wincc_oa_path>/msg/<lang>.
|
Member of
Errors |
Availability
UI, CTRL, DP |
See also
V 3.11 SP1
Copyright ETM professional control GmbH 2013 All Rights Reserved