Update cookies preferences
Promotic

onAppError - event of the PmaRoot object

Description:
The event is triggered when a global error in the application occurs.
Parameters:
pMe(Object) Reference to the PmaRoot object where the event rises.
pEvent(Object) Reference to an object describing detailed information about the specific event.
pEvent.Type - (Long) [for reading] Error type (tab in the INFO system)
0 - global error
1 - script error
2 - panel error
3 - communication error (serial link, Ethernet, Web, DDE, etc.)
4 - database error
5 - application error
pEvent.Ident - (String) [for reading] Text description (identifier) of the error
pEvent.Note - (String) [for reading] Note to the error
pEvent.Counter - (Long) [for reading] The number of already upraised errors with the specified identifier.
Note:
If an error occurs in the application, then the error is captured and treated so as the application could run further. The error is written into the INFO system and the onAppError event is triggered. In this event it is possible to call, for example, the alarm or other actions according to the designer requirements.
At script errors only the first rise of the error is captured (only if pEvent.Counter equals 1) to prevent endless loop if the error founds itself in the script of the onAppError event.
Example:
JavaScriptVBScriptSelect and copy to clipboard

var sErr = "AppError: Type=" + pEvent.Type + ", Ident=" + pEvent.Ident + ", Note=" + pEvent.Note + ", Counter=" + pEvent.Counter;
Pm.Debug(sErr);
PROMOTIC 9.0.29 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.