get_error_text ( : : ErrorNumber : ErrorText )

Inquiry after the error text of a HALCON error number.

The operator get_error_text returns the error text for the corresponding HALCON error number. This is indeed the same text which will be given during an exception. The operator get_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 HALCON error.
Restriction: (1 <= ErrorNumber) && (ErrorNumber <= 36000)

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


Example
Herror   err;
char       message[MAX_STRING];

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

Result

The operator get_error_text always returns the value 2 (H_MSG_TRUE).


Parallelization Information

get_error_text is reentrant and processed without parallelization.


Possible Predecessors

set_check


See also

set_check


Module

System



Copyright © 1996-2005 MVTec Software GmbH