File numerics/src/tools/sn_error_handling.h

Go to the source code of this file

error handling functions and data structures

Defines

SN_SETJMP_INTERNAL_START
SN_SETJMP_INTERNAL_STOP
SN_SETJMP_EXTERNAL_START
SN_SETJMP_EXTERNAL_STOP

Enums

enum SN_ERROR_T

Values:

enumerator SN_NO_ERROR
enumerator SN_MEMORY_ALLOC_ERROR
enumerator SN_UNSUPPORTED_LINALG_OP
enumerator SN_PROBLEM_NOT_PROCESSABLE
enumerator SN_UNKOWN_ERROR
enumerator SN_NOT_COMPILED_ERROR

Functions

jmp_buf *sn_get_jmp_buf(void)
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

jmp_buf *sn_get_internal_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_fatal_error(SN_ERROR_T code, const char *msg)
const char *sn_fatal_error_msg(void)