Generate a program error with a custom program error number

Options
dragolollo
edited January 9 in RobotStudio
Hello,

The instruction "ErrWrite" is used to generate and display an error message on the teach pendant and, in case of a program error, the error number is 80001.
Is it possible to define a custom error number?
Thank you
Tagged:

Comments

  • lemster68
    lemster68 ✭✭✭
    Options
    I  think that you might use BookErrNo to first RAISE the error, then use ErrWrite to write to the log and/or pendant.  I think that the only real significance for the 80001 is that it has it's own error domain then.
    Other than that, a programmer can declare their own error numbers, just like any pre-defined data, and Raise an error using that number.
    Lee Justice
  • dragolollo
    Options
    I think the way is to use ErrLog.
    It seems like if you use ErrWrite the only possible error number is 80001and if you use ErrRaise you can define your own error number but it only generates warnings.