![]() |
PK_ERROR_register_callbacks |
PK_ERROR_code_t PK_ERROR_register_callbacks ( --- received arguments --- PK_ERROR_frustrum_t frustrum --- application's error handler ) This function registers the given application error handler for the session. The handler will be called and passed a PK_ERROR_sf_t describing an error just before a failing PK function is about to return. If the failing function has not been invoked from a subthread (see PK_SESSION_is_in_kernel_2), then the handler may longjump over Parasolid providing PK_SESSION_tidy is called before any other PK functions are executed. PK_SESSION_tidy must not be called if the error handler returns control to Parasolid. If a NULL value has been provided for the handler then no attempt will be made to invoke it. Error handlers may be registered or changed at any time. The error handler set with this function applies session-wide. Application threads may register thread-specific error handlers with PK_THREAD_register_error_cbs. If multiple application threads are used to call Parasolid, the session- wide error handler must be thread-safe, since it will be possible for it to be called simultaneously from two different threads.