alf_error_handler_register

NAME

alf_error_handler_register - Registers a global error handler function to the ALF runtime code.

SYNOPSIS

int alf_error_handler_register(alf_handle_t alf_handle, alf_error_handler_t error_handler_function, void *p_context)

Parameters  
alf_handle [IN] A handle to the ALF runtime code.
error_handler_function [IN] A pointer to the user-defined error handler function. A NULL value resets the error handler to the ALF default handler.
p_context [IN] A pointer to the user-defined context data for the error handler function. This pointer is passed to the user-defined error handler function when it is invoked.

DESCRIPTION

This function registers a global error handler function to the ALF runtime code. If an error handler has already been registered, the new one replaces it.

RETURN VALUE

0 Successful.
less than 0 Errors occurred:
  • ALF_ERR_INVAL: Invalid input argument
  • ALF_ERR_BADF: Invalid ALF handle
  • ALF_ERR_PERM: The API call is not permitted at the current context
  • ALF_ERR_FAULT: Invalid buffer or error handler address (only when it is possible to detect the fault)
  • ALF_ERR_GENERIC: Generic internal errors
Related reference
alf_handle_t
alf_init
alf_query_system_info
alf_num_instances_set
alf_exit
ALF_ERR_POLICY_T