File numerics/src/tools/sn_error_handling.h¶

Go to the source code of this file

error handling functions and data structures

Enums

enum SN_ERROR_T

Values:

SN_NO_ERROR
SN_MEMORY_ALLOC_ERROR
SN_UNSUPPORTED_LINALG_OP
SN_PROBLEM_NOT_PROCESSABLE
SN_UNKOWN_ERROR
SN_NOT_COMPILED_ERROR

Functions

void sn_fatal_error(SN_ERROR_T code, const char *msg)
const char *sn_fatal_error_msg(void)
jmp_buf *sn_get_internal_jmp_buf(void)
jmp_buf *sn_get_jmp_buf(void)
void sn_release_internal_jmp_buf(void)

Release the internal jmp buffer: this indicates that it is no longer in use and that there should be no longjmp() call to this part of the stack.

The user should call this function whenever the call to a numerics function has been successful.

Warning
This should not be called outside the numerics library. Use sn_release_jmp_buf() instead when calling from another library/executable

void sn_release_jmp_buf(void)

Release the internal jmp buffer: this indicates that it is no longer in use and that there should be no longjmp() call to this part of the stack.

The user should call this function whenever the call to a numerics function has been successful