onAppError - event of object PmRoot

The event fires when a global error in the application occurs.
pMe(Object) Reference to the Promotic object where the event rises.
pEvent(Object) A referrence to object describing detailed information about the specific event.
pEvent.Type - (Integer) Error type
0 - unspecified error type
1 - script error
2 - panel error
3 - communication error (serial link, Ethernet, WEB, DDE, etc.)
pEvent.Ident - (String) Text description (identifier) of the error
pEvent.Note - (String) Note to the error
pEvent.Counter - (Long) Number of already upraised errors with the specified identifier

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 fires. 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 when the pEvent.Counter equals 1) to prevent endless loop if the error founds itself in the script of the onAppError event.

© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice