Expand description
C FFI error handling.
This module provides thread-local error storage and extern "C" functions for retrieving
and clearing error information from C code:
diffsol_error_code— returnsDIFFSOL_OK,DIFFSOL_ERR, orDIFFSOL_BAD_ARG.diffsol_last_error_message— returns a pointer to the last error message.diffsol_last_error_file/diffsol_last_error_line— return the source location of the last error.diffsol_clear_last_error— clears the thread-local error state.
Functions§
- diffsol_
clear_ ⚠last_ error - Clear the last error for the current thread.
- diffsol_
error ⚠ - Return the last error message for the current thread, if any.
- diffsol_
error_ ⚠code - Return whether thread-local error state is currently set.
- diffsol_
last_ ⚠error_ file - Return the source file associated with the last error for the current thread.
- diffsol_
last_ ⚠error_ line - Return the source line associated with the last error for the current thread.
- diffsol_
last_ ⚠error_ message - Return the last error message for the current thread, if any.