|
IUF-SDK-3
Interventional Ultrasound Library
|
IUF error codes. More...
Go to the source code of this file.
Macros | |
| #define | IUF_ERROR_PUSH(maj, min, msg) iufErrorPush(__FILE__, __func__, __LINE__, maj, min, msg) |
| Convenience macro, that pushes the error from current file function and line number. More... | |
| #define | IUF_ERROR_PRINT(maj, min, msg) |
| Convenience macro, that pushes the error from current file function and line number and prints it. More... | |
| #define | IUF_ERROR_FMT_PUSH(maj, min, fmt, ...) iufErrorFormatAndPush(__FILE__, __func__, __LINE__, maj, min, fmt, __VA_ARGS__) |
| Convenience macro, that formats and pushes the error from current file function and line number. More... | |
| #define | IUF_ERROR_FMT_PRINT(maj, min, fmt, ...) |
| Convenience macro, that formats, pushes the error from current file function and line number and prints it. More... | |
| #define | IUF_ERR_ALLOC_NULL_N_RETURN(var, adt, retval) |
| Convenience macro, that pushes IUF_ERR_MAJ_MEMORY, IUF_ERR_MIN_ALLOC for var that is NULL and returns retval. More... | |
| #define | IUF_ERR_CHECK_NULL_N_RETURN(var, retval) |
| Convenience macro, that pushes IUF_ERR_MAJ_VALUE, IUF_ERR_MIN_ARG_NULL_VALUE for var that is NULL and returns retval. More... | |
| #define | IUF_ERR_CHECK_EMPTYSTR_N_RETURN(var, return_value) |
| Convenience macro, that pushes IUF_ERR_MAJ_VALUE, IUF_ERR_MIN_ARG_VALUE for empty string var and returns retval. More... | |
| #define | IUF_ERR_STRP_NULL_EMPTY(var, retval) |
| Convenience macro, that sequentially calls IUF_ERR_CHECK_NULL_N_RETURN and IUF_ERR_CHECK_EMPTYSTR_N_RETURN. More... | |
| #define | IUF_ERR_EVAL_N_RETURN(expr, retval) |
| Convenience macro, that evaluates expression expr and pushes IUF_ERR_MAJ_VALUE, IUF_ERR_MIN_ARG_VALUE when true and returns retval. More... | |
| #define | IUF_ERR_GENERAL (100001) |
| List of error codes. More... | |
| #define | IUF_ERR_MEMORY (100002) |
| #define | IUF_ERR_VALUE (100003) |
| #define | IUF_UNUSED(x) (void)(x) |
| Prevent unused parameter warning. More... | |
| #define | IUF_ASSERT(IN_CONDITION) |
| IUF assertion, general. More... | |
| #define | IUF_ASSERT_MEMORY(IN_CONDITION) |
| IUF assertion, memory. More... | |
| #define | IUF_ASSERT_VALUE(IN_CONDITION) |
| IUF assertion, value. More... | |
Functions | |
| int | iufErrorGetCount (void) |
| Get the number of errors that occurred so far. More... | |
| int | iufErrorPrint () |
| Prints the Error stack. More... | |
| char * | iufErrorString () |
| Create a string representation of the current Error stack. More... | |
| int | iufErrorPush (const char *pFileName, const char *pFunctionName, int lineNumber, hid_t maj, hid_t min, char *msg) |
| Pushes an Error context onto the IUF error stack. More... | |
| int | iufErrorFormatAndPush (const char *pFileName, const char *pFunctionName, int lineNumber, hid_t maj, hid_t min, char *msgFormat,...) |
| Format and Push an Error context onto the IUF error stack. More... | |
| int | iufHDF5ErrorLog (IUF_BOOL enable) |
| Enable or disable HDF5 library error logging. More... | |
| int | iufErrorLog (IUF_BOOL enable) |
| Enable or disable IUF library error logging. More... | |
| int | iufErrorLogClear (void) |
| Removes all messages from the error stack. More... | |
| int | iufErrorSetStream (FILE *stream) |
| Error messages wil be printed to this FILE stream (i.e. stdout would sent the errors to console output). More... | |
| int | iufErrorSetStreamToFile (const char *pFileName) |
| Error messages wil be printed to the file with name pFileName. More... | |
| int | iufErrorCloseFileStream () |
| Closes the filestream opened with iufErrorSetStreamToFile() and resets the stream to stderr. More... | |
| int | iufErrorAutoReportSet (IUF_BOOL enable) |
| Error messages wil printed when encountered by the library calls. More... | |
| IUF_BOOL | iufErrorAutoReportGet (void) |
| Error messages wil printed when encountered by the library calls. More... | |
Variables | |
| hid_t | IUF_ERR_MAJ_GENERAL |
| Major error handling class for general errors. More... | |
| hid_t | IUF_ERR_MAJ_MEMORY |
| Major error handling class for memory errors. More... | |
| hid_t | IUF_ERR_MAJ_VALUE |
| Major error handling class for value related errors. More... | |
| hid_t | IUF_ERR_MAJ_ERROR |
| Major error handling class for errors. More... | |
| hid_t | IUF_ERR_MAJ_HDF5 |
| Major error handling class for hdf5 io errors. More... | |
| hid_t | IUF_ERR_MIN_ARG_VALUE |
| Minor error handling class for argument value errors. More... | |
| hid_t | IUF_ERR_MIN_ARG_FILENAME |
| Minor error handling class for filename errors. More... | |
| hid_t | IUF_ERR_MIN_ALLOC |
| Minor error handling class for memory allocation value errors. More... | |
| hid_t | IUF_ERR_MIN_MEMCOPY |
| Minor error handling class for memory errors. More... | |
| hid_t | IUF_ERR_MIN_FORMAT |
| Minor error handling class for formatting errors. More... | |
| hid_t | IUF_ERR_MIN_ARG_NULL_VALUE |
| Minor error handling class for NULL values. More... | |
| hid_t | IUF_ERR_MIN_ARG_DUPLICATE_KEY |
| Minor error handling class for duplicate key errors in a dictionary. More... | |
| hid_t | IUF_ERR_MIN_ARG_INVALID_KEY |
| Minor error handling class for invalid key errors in a dictionary. More... | |
| hid_t | IUF_ERR_MIN_HDF5 |
| Minor error handling class for invalid hdf5 file io errors. More... | |
| hid_t | IUF_ERR_MIN_ASSERT_FAILED |
| Minor error handling class for assertion errors. More... | |
IUF error codes.
| #define IUF_ASSERT | ( | IN_CONDITION | ) |
IUF assertion, general.
| #define IUF_ASSERT_MEMORY | ( | IN_CONDITION | ) |
IUF assertion, memory.
| #define IUF_ASSERT_VALUE | ( | IN_CONDITION | ) |
IUF assertion, value.
| #define IUF_ERR_ALLOC_NULL_N_RETURN | ( | var, | |
| adt, | |||
| retval | |||
| ) |
Convenience macro, that pushes IUF_ERR_MAJ_MEMORY, IUF_ERR_MIN_ALLOC for var that is NULL and returns retval.
| #define IUF_ERR_CHECK_EMPTYSTR_N_RETURN | ( | var, | |
| return_value | |||
| ) |
Convenience macro, that pushes IUF_ERR_MAJ_VALUE, IUF_ERR_MIN_ARG_VALUE for empty string var and returns retval.
| #define IUF_ERR_CHECK_NULL_N_RETURN | ( | var, | |
| retval | |||
| ) |
Convenience macro, that pushes IUF_ERR_MAJ_VALUE, IUF_ERR_MIN_ARG_NULL_VALUE for var that is NULL and returns retval.
| #define IUF_ERR_EVAL_N_RETURN | ( | expr, | |
| retval | |||
| ) |
Convenience macro, that evaluates expression expr and pushes IUF_ERR_MAJ_VALUE, IUF_ERR_MIN_ARG_VALUE when true and returns retval.
| #define IUF_ERR_GENERAL (100001) |
List of error codes.
general error
| #define IUF_ERR_MEMORY (100002) |
memory error
| #define IUF_ERR_STRP_NULL_EMPTY | ( | var, | |
| retval | |||
| ) |
Convenience macro, that sequentially calls IUF_ERR_CHECK_NULL_N_RETURN and IUF_ERR_CHECK_EMPTYSTR_N_RETURN.
| #define IUF_ERR_VALUE (100003) |
value error
| #define IUF_ERROR_FMT_PRINT | ( | maj, | |
| min, | |||
| fmt, | |||
| ... | |||
| ) |
Convenience macro, that formats, pushes the error from current file function and line number and prints it.
| #define IUF_ERROR_FMT_PUSH | ( | maj, | |
| min, | |||
| fmt, | |||
| ... | |||
| ) | iufErrorFormatAndPush(__FILE__, __func__, __LINE__, maj, min, fmt, __VA_ARGS__) |
Convenience macro, that formats and pushes the error from current file function and line number.
| #define IUF_ERROR_PRINT | ( | maj, | |
| min, | |||
| msg | |||
| ) |
Convenience macro, that pushes the error from current file function and line number and prints it.
| #define IUF_ERROR_PUSH | ( | maj, | |
| min, | |||
| msg | |||
| ) | iufErrorPush(__FILE__, __func__, __LINE__, maj, min, msg) |
Convenience macro, that pushes the error from current file function and line number.
| #define IUF_UNUSED | ( | x | ) | (void)(x) |
Prevent unused parameter warning.
| IUF_BOOL iufErrorAutoReportGet | ( | void | ) |
| int iufErrorAutoReportSet | ( | IUF_BOOL | enable | ) |
Error messages wil printed when encountered by the library calls.
| enable | IUF_TRUE enables / IUF_FALSE disables automatic error logging |
| int iufErrorCloseFileStream | ( | ) |
Closes the filestream opened with iufErrorSetStreamToFile() and resets the stream to stderr.
| int iufErrorFormatAndPush | ( | const char * | pFileName, |
| const char * | pFunctionName, | ||
| int | lineNumber, | ||
| hid_t | maj, | ||
| hid_t | min, | ||
| char * | msgFormat, | ||
| ... | |||
| ) |
Format and Push an Error context onto the IUF error stack.
| pFileName | The source file of the error |
| pFunctionName | The function that caused the error |
| lineNumber | The line number in the source file of the error |
| maj | The major error class |
| min | The minor error class |
| msgFormat | The error message format (like sprintf) |
| int iufErrorGetCount | ( | void | ) |
Get the number of errors that occurred so far.
| int iufErrorLog | ( | IUF_BOOL | enable | ) |
Enable or disable IUF library error logging.
| enable | IUF_TRUE enables / IUF_FALSE disables error logging |
| int iufErrorLogClear | ( | void | ) |
Removes all messages from the error stack.
| int iufErrorPrint | ( | ) |
Prints the Error stack.
| int iufErrorPush | ( | const char * | pFileName, |
| const char * | pFunctionName, | ||
| int | lineNumber, | ||
| hid_t | maj, | ||
| hid_t | min, | ||
| char * | msg | ||
| ) |
Pushes an Error context onto the IUF error stack.
| pFileName | The source file of the error |
| pFunctionName | The function that caused the error |
| lineNumber | The line number in the source file of the error |
| maj | The major error class |
| min | The minor error class |
| msg | The error message |
| int iufErrorSetStream | ( | FILE * | stream | ) |
Error messages wil be printed to this FILE stream (i.e. stdout would sent the errors to console output).
| stream | Valid FILE stream like from fopen or constants like stderr/stdout |
| int iufErrorSetStreamToFile | ( | const char * | pFileName | ) |
Error messages wil be printed to the file with name pFileName.
| char* iufErrorString | ( | ) |
Create a string representation of the current Error stack.
| int iufHDF5ErrorLog | ( | IUF_BOOL | enable | ) |
Enable or disable HDF5 library error logging.
| enable | IUF_TRUE enables / IUF_FALSE disables error logging |
| hid_t IUF_ERR_MAJ_ERROR |
Major error handling class for errors.
| hid_t IUF_ERR_MAJ_GENERAL |
Major error handling class for general errors.
| hid_t IUF_ERR_MAJ_HDF5 |
Major error handling class for hdf5 io errors.
| hid_t IUF_ERR_MAJ_MEMORY |
Major error handling class for memory errors.
| hid_t IUF_ERR_MAJ_VALUE |
Major error handling class for value related errors.
| hid_t IUF_ERR_MIN_ALLOC |
Minor error handling class for memory allocation value errors.
| hid_t IUF_ERR_MIN_ARG_DUPLICATE_KEY |
Minor error handling class for duplicate key errors in a dictionary.
| hid_t IUF_ERR_MIN_ARG_FILENAME |
Minor error handling class for filename errors.
| hid_t IUF_ERR_MIN_ARG_INVALID_KEY |
Minor error handling class for invalid key errors in a dictionary.
| hid_t IUF_ERR_MIN_ARG_NULL_VALUE |
Minor error handling class for NULL values.
| hid_t IUF_ERR_MIN_ARG_VALUE |
Minor error handling class for argument value errors.
| hid_t IUF_ERR_MIN_ASSERT_FAILED |
Minor error handling class for assertion errors.
| hid_t IUF_ERR_MIN_FORMAT |
Minor error handling class for formatting errors.
| hid_t IUF_ERR_MIN_HDF5 |
Minor error handling class for invalid hdf5 file io errors.
| hid_t IUF_ERR_MIN_MEMCOPY |
Minor error handling class for memory errors.