My Project
Macros
ssht_error.h File Reference
#include <stdio.h>

Go to the source code of this file.

Macros

#define SSHT_ERROR_GENERIC(comment)
 
#define SSHT_ERROR_MEM_ALLOC_CHECK(pointer)
 

Detailed Description

Error macros used in SSHT package.

Author
Jason McEwen

Definition in file ssht_error.h.

Macro Definition Documentation

◆ SSHT_ERROR_GENERIC

#define SSHT_ERROR_GENERIC (   comment)
Value:
printf("ERROR: %s.\n", comment); \
printf("ERROR: %s <%s> %s %s %s %d.\n", \
"Occurred in function", \
__func__, \
"of file", __FILE__, \
"on line", __LINE__); \
exit(1);

Definition at line 19 of file ssht_error.h.

◆ SSHT_ERROR_MEM_ALLOC_CHECK

#define SSHT_ERROR_MEM_ALLOC_CHECK (   pointer)
Value:
if(pointer == NULL) { \
SSHT_ERROR_GENERIC("Memory allocation failed") \
}

Definition at line 28 of file ssht_error.h.