Error Handling
06/2005
Danaher Motion
164 Rev
E
M-SS-005-03l
11.4.4. Log
User exceptions are printed and logged according to existing rules: A note is
printed but not logged, Unhandled errors are printed and logge, etc. In
addition, the application developer can log an error without any error
handling. Application exception is printed and logged but neither task
generated such an exception nor motion associated with that task stops.
User exceptions are logged according to the existing rules. Errors and faults
are printed and logged while notes are only printed.
You can use
LOGGER
to lsend exceptions directly to the logger, bypassing
any error handler. The exception can be logged with the following command:
Logger <
Exception name
>
For example:
Logger MyError
11.4.5. Query
You can query exception numbers and messages, but changing these
parameters is forbidden. The exception number and text are set during
exception definition and stay constant until the exception is deleted or the
defined task is killed. For example:
Æ
?MyError.num
20007
Æ
?MyError.Msg
My Error
11.4.6. Print
Exceptions are printed and logged with timestamp, task name, and line
number, severity and other error attributes. In contrast to internal
(predefined) errors, an exception number is not constant and may vary from
time to time (from task load to task load). Also, the error log may keep
exceptions from tasks not in memory and there is no way to associate an
exception number with its message. The error logger keeps exception
messages in RAM and files.
11.4.7. Limitations
1.
VARLIST
and
SAVE
do not show exceptions.
2.
WATCH
is not supported.
3.
Arrays of exceptions not supported.
4.
Definition of exceptiosn in subroutines is not supported.
5.
Arithmetical operations are not supported for exceptions. Comparing
exceptions makes sense only if the application developer explicitly
gives exception numbers. If the MC assigns exception numbers, the
result is unpredictable.
6.
The library can assert an exception defined as
DIM SHARED
or
COMMON SHARED
. Realize that exceptions defined in the library do
not have constant numbers (if numbers were not assigned explicitly).