#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "ccp4_errno.h"
Classes | |
struct | error_system |
Functions | |
const char * | ccp4_strerror (int error) |
void | ccp4_error (const char *msg) |
void | ccp4_fatal (const char *message) |
int | CFile_Perror (const char *msg) |
int | ccp4_liberr_verbosity (int iverb) |
void | ccp4_signal (const int code, const char *const msg, void(*callback)()) |
Variables | |
int | ccp4_errno = 0 |
void ccp4_error | ( | const char * | msg | ) |
Print out passed message and internal message based upon ccp4_errno "message : error message "
msg | (const char *) |
void ccp4_fatal | ( | const char * | message | ) |
Wrapper for ccp4_error which also calls exit(1)
message |
int ccp4_liberr_verbosity | ( | int | iverb | ) |
Set error verbosity level
[in] | iverb | Error level |
void ccp4_signal | ( | const int | code, | |
const char *const | msg, | |||
void(*)() | callback | |||
) |
Routine to set ccp4_errno and print out message for error tracing. This should be the only way in which ccp4_errno is set. See error codes above for levels and systems. A callback with prototype void function(void) may also be passed to the routine.
[in] | code | error code (int) |
[in] | msg | error message |
[in] | callback | point to callback routine |
const char* ccp4_strerror | ( | int | error | ) |
Obtain character string based upon error code. Typical use ccp4_strerror(ccp4_errno) The returned string is statically allocated in the library_err.c file and should not be freed.
error | error code (int) |
int CFile_Perror | ( | const char * | msg | ) |
Output error messaage to stderr.
msg | Error message. |
int ccp4_errno = 0 |
ccp4_errno: global to store data