Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

sobj_exc.c File Reference


Detailed Description

Exception and message support functions.

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include "sobject_p.h"

Include dependency graph for sobj_exc.c:

Include dependency graph

Functions

size_t sobj_exc_args (struct sobj *exc, int *arg_n, const char **key, struct sobj **value, char *buffer, size_t buffer_size)
 Get the argument keys and values from an exception or message object.
size_t sobj_exc_sourceref_to_string (struct sobj *exc, bool show_module, char *buffer, size_t buffer_size)
 Convert a source reference from an exception or message object to a string.
size_t sobj_exc_to_string (struct sobj *exc, bool compact, char *buffer, size_t buffer_size)
 Create a string representation of an exception object.
size_t sobj_msg_to_string (struct sobj *msg, bool compact, char *buffer, size_t buffer_size)
 Create a string representation of a message object.
bool sobj_exc_xcls_match (const char *exc_class, const char *xcls)
 Check if the specfied exception class matches the specfied class.
bool sobj_exc_do_match (struct sobj *exc, const char *xcls, bool exact)
 Internal function implementing sobj_exc_match() and sobj_exc_match_exact().
bool sobj_exc_match (struct sobj *exc, const char *xcls)
 Check if an exception object matches the specfied exception class.
bool sobj_exc_match_exact (struct sobj *exc, const char *xcls)
 Check if an exception object matches the specfied exception class.
bool sobj_exc_match_id (struct sobj *exc, const char *id, const char *module)
 Check if the specfied exception or message object matches the specfied exception/message ID.
size_t sobj_exc_sourceref (struct sobj *exc, const char **module, const char **file, int *line, const char **func, char *buffer, size_t buffer_size)
 Get the source reference from the specfied exception or message object.
size_t sobj_exc_info (struct sobj *exc, int *xcls_n, const char **xcls, const char **id, int *arg_n, const char **key, struct sobj **value, char *buffer, size_t buffer_size)
 Extract the class, ID, and argument information from an exception object.
sobjsobj_exc_strip (struct sobj *exc, unsigned flags)
 Strip information from an exception or message object.
void sobj_exc_dump (struct sobj *exc)
 Dump a string representation of an exception object to the standard error stream.

Function Documentation

bool sobj_exc_do_match struct sobj exc,
const char *  xcls,
bool  exact
[inline, static]
 

Internal function implementing sobj_exc_match() and sobj_exc_match_exact().

Parameters:
exc The exception object.
xcls The exception class or module/class tuple.
exact Flag indicating if the class names must match exactly. This flag is true for sobj_exc_match_exact() and false for sobj_exc_match().
Returns:
See sobj_exc_match() or sobj_exc_match_exact().
See also:
sobj_exc_match(), sobj_exc_match_exact().


Generated on Sat Jul 23 16:05:13 2005 for sobject by  doxygen 1.3.9.1