error_text ( : : ErrorNumber : ErrorText )

Inquiry after the error text of a HORUS error number.

The operator error_text returns the error text for the corresponding HORUS error number. This is indeed the same text which will be given during an exception. The operator error_text is especially useful if the error treatment is programmed by the users themselves (see also set_check(::'~give_error':)).


Attention

Unknown error numbers will trigger a standard message.


Parameters

ErrorNumber (input_control)
integer -> integer
Number of the HORUS error.
Restriction: (1 <= ErrorNumber) && (ErrorNumber <= 36000)

ErrorText (output_control)
string -> string
Corresponding error text.


Example
ERR_TYPE   err;
char       message[MAX_STRING];

set_check("~give_error");
err = send_region(region,socket_id);
set_check("give_error");
if (err != MESS_TRUE) {
  error_text((long)err,message);
  fprintf(stderr,"my error message: %s\n",message);
  exit(1);
}

Result

The operator error_text always returns the value TRUE.


Possible Predecessors

set_check


See also

set_check



Copyright © 1996-1997 MVTec Software GmbH