Adding support for errcontext in set_error_handler callback