Skip to content

get_extended_error_infoGetExtendedErrorInfoGetExtendedErrorInfoget_extended_error_infoget_extended_error_infoπŸ”—

Short descriptionπŸ”—

get_extended_error_infoGetExtendedErrorInfoGetExtendedErrorInfoget_extended_error_infoget_extended_error_info β€” Returns the extended error information for the calling thread’s last HALCON error.

SignatureπŸ”—

get_extended_error_info( out string OperatorName, out integer ErrorCode, out string ErrorMessage )void GetExtendedErrorInfo( HTuple* OperatorName, HTuple* ErrorCode, HTuple* ErrorMessage )static void HOperatorSet.GetExtendedErrorInfo( out HTuple operatorName, out HTuple errorCode, out HTuple errorMessage )def get_extended_error_info( ) -> Tuple[str, int, str]

Herror get_extended_error_info( char* OperatorName, Hlong* ErrorCode, char* ErrorMessage )

Herror T_get_extended_error_info( Htuple* OperatorName, Htuple* ErrorCode, Htuple* ErrorMessage )

static HString HSystem::GetExtendedErrorInfo( Hlong* ErrorCode, HString* ErrorMessage )

static string HSystem.GetExtendedErrorInfo( out int errorCode, out string errorMessage )

DescriptionπŸ”—

get_extended_error_infoGetExtendedErrorInfo returns the last error code that occurred in the calling thread. OperatorNameoperatorNameoperator_name contains the operator name of the HALCON operator that has set this error code. ErrorCodeerrorCodeerror_code holds the actual error code and ErrorMessageerrorMessageerror_message the corresponding error message. If no error code has been set so far or a HALCON error comes with no extended error information, OperatorNameoperatorNameoperator_name and ErrorMessageerrorMessageerror_message contain an empty string and ErrorCodeerrorCodeerror_code is set to 00. Please refer to β€˜Result’ slot of the particular operator reference to determine whether and on which occasion an operator provides extended error information.

get_extended_error_infoGetExtendedErrorInfo is thread-local, i.e., the extended error information is maintained on a per thread basis. Setting an extended error code in one thread does not affect the extended error information in any other thread. This also implies that an error code can only be retrieved within the thread that was calling the operator setting the extended error. A thread-local extended error will be cleared (and set again when applicable) as soon as an error occurs in any other successive operator call within the same thread, if set_systemSetSystem is called from within the same thread with the 'tsp_clear_extended_error'"tsp_clear_extended_error" parameter, or the thread terminates.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

OperatorNameoperatorNameoperator_name (output_control) string β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Operator that set the error code.

ErrorCodeerrorCodeerror_code (output_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Extended error code.

ErrorMessageerrorMessageerror_message (output_control) string β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Extended error message.

Combinations with other operatorsπŸ”—

Combinations

See also

get_error_textGetErrorText

ModuleπŸ”—