edt_error.c File Reference


Detailed Description

Generalized error handling for edt and pdv libraries.

Copyright 2000 Engineering Design Team

Definition in file edt_error.c.

#include "edt_utils.h"
#include "edt_error.h"
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <sys/errno.h>

Go to the source code of this file.

Defines

#define EDT_DEFAULT_MSG_LEVEL
#define MAX_MESSAGE   512

Functions

int edt_get_verbosity ()
int edt_msg (int level, const char *format,...)
 Submits a message to the default message handler, which will conditionally (based on the flag bits) send the message to the default message handler function.
void edt_msg_add_level (EdtMsgHandler *msg_p, int level)
 Sets the message level to the combination of the specified level with the message handler's previous level.
void edt_msg_close (EdtMsgHandler *msg_p)
 Closes and frees up memory associated with a message handler.
EdtMsgHandleredt_msg_default_handle ()
 Gets the default message handler.
int edt_msg_default_level ()
 Gets the message level that messages must match in order to be handled by the default message handler.
int edt_msg_get_level (EdtMsgHandler *msg_p)
 Gets the message level that messages must match in order to be handled by the message handler msg_p.
void edt_msg_init (EdtMsgHandler *msg_p)
 Initializes a message handler with default values.
void edt_msg_init_files (EdtMsgHandler *msg_p, FILE *file, int level)
 Initializes a message handler to use the specified file and level.
void edt_msg_init_names (EdtMsgHandler *msg_p, char *file, int level)
 Initializes a message handler to use the named file and specified level.
char * edt_msg_last_error ()
 Gets the message last sent to the output by the edt message handling system.
int edt_msg_output (EdtMsgHandler *msg_p, int level, const char *format,...)
 Submits a message using the msg_p message handler, which will conditionally (based on the flag bits) send the message to the handler's function.
int edt_msg_output_perror (EdtMsgHandler *msg_p, int level, const char *msg)
 Conditionally (based on the flag bits) outputs message, followed by the last system error message, to msg_p.
int edt_msg_output_printf_perror (EdtMsgHandler *msg_p, int level, const char *format,...)
 Writes to the specified EdtMsgHandler a caller-specified message (in the printf-style format) followed by the last system error message.
int edt_msg_perror (int level, const char *msg)
 Conditionally outputs a system perror using the default message handler.
int edt_msg_printf_perror (int level, const char *format,...)
 Outputs a caller-specified message to the output, followed by the last system error message.
void edt_msg_set_file (EdtMsgHandler *msg_p, FILE *fp)
 Sets the output file pointer for the message handler.
void edt_msg_set_function (EdtMsgHandler *msg_p, EdtMsgFunction f)
 Sets the function to call when a message event occurs.
void edt_msg_set_level (EdtMsgHandler *msg_p, int newlevel)
 Sets the "message level" flag bits that determine whether to call the message handler for a given message.
void edt_msg_set_name (EdtMsgHandler *msg_p, const char *name)
 Sets the output file to the named file.
void edt_msg_set_target (EdtMsgHandler *msg_p, void *target)
 Sets the target in the message handler.
void edt_set_verbosity (int verbose)
int lvl_printf (int delta, char *format,...)

Variables

EdtMsgHandler edt_default_msg


Generated on 19 Jun 2015 by  doxygen 1.4.7