Tissue Forge C 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfCError.h File Reference
#include "tf_port_c.h"
Include dependency graph for tfCError.h:

Go to the source code of this file.

Data Structures

struct  tfErrorHandle
 Handle to a Error instance. More...
 

Functions

HRESULT tfError_getErr (struct tfErrorHandle *handle, HRESULT *err)
 Get the error code.
 
HRESULT tfError_getMsg (struct tfErrorHandle *handle, char **msg, unsigned int *numChars)
 Get the error message.
 
HRESULT tfError_getLineno (struct tfErrorHandle *handle, int *lineno)
 Get the originating line number.
 
HRESULT tfError_getFname (struct tfErrorHandle *handle, char **fname, unsigned int *numChars)
 Get the originating file name.
 
HRESULT tfError_getFunc (struct tfErrorHandle *handle, char **func, unsigned int *numChars)
 Get the originating function name.
 
HRESULT tfErrSet (HRESULT code, const char *msg, int line, const char *file, const char *func)
 
bool tfErrOccurred ()
 
void tfErrClear ()
 
HRESULT tfErrStr (struct tfErrorHandle *handle, char **str, unsigned int *numChars)
 
HRESULT tfErrGetAll (struct tfErrorHandle ***handles, unsigned int *numErrors)
 Get all error indicators.
 
HRESULT tfErrGetFirst (struct tfErrorHandle **handle)
 
void tfErrClearFirst ()
 
HRESULT tfErrPopFirst (struct tfErrorHandle **handle)
 

Function Documentation

◆ tfErrClear()

void tfErrClear ( )

Clear the error indicator. If the error indicator is not set, there is no effect.

◆ tfErrClearFirst()

void tfErrClearFirst ( )

Clear the first error

◆ tfErrGetAll()

HRESULT tfErrGetAll ( struct tfErrorHandle *** handles,
unsigned int * numErrors )

Get all error indicators.

Parameters
handleserror indicators
numErrorsnumber of error indicators
Returns
S_OK on success

◆ tfErrGetFirst()

HRESULT tfErrGetFirst ( struct tfErrorHandle ** handle)

Get the first error

◆ tfErrOccurred()

bool tfErrOccurred ( )

Check whether there is an error indicator.

◆ tfError_getErr()

HRESULT tfError_getErr ( struct tfErrorHandle * handle,
HRESULT * err )

Get the error code.

Parameters
handlepopulated handle
errerror code
Returns
S_OK on success

◆ tfError_getFname()

HRESULT tfError_getFname ( struct tfErrorHandle * handle,
char ** fname,
unsigned int * numChars )

Get the originating file name.

Parameters
handlepopulated handle
fnameoriginating file name
numCharsnumber of characters of string representation
Returns
S_OK on success

◆ tfError_getFunc()

HRESULT tfError_getFunc ( struct tfErrorHandle * handle,
char ** func,
unsigned int * numChars )

Get the originating function name.

Parameters
handlepopulated handle
funcoriginating function name
numCharsnumber of characters of string representation
Returns
S_OK on success

◆ tfError_getLineno()

HRESULT tfError_getLineno ( struct tfErrorHandle * handle,
int * lineno )

Get the originating line number.

Parameters
handlepopulated handle
linenooriginating line number
Returns
S_OK on success

◆ tfError_getMsg()

HRESULT tfError_getMsg ( struct tfErrorHandle * handle,
char ** msg,
unsigned int * numChars )

Get the error message.

Parameters
handlepopulated handle
msgerror message
numCharsnumber of characters of string representation
Returns
S_OK on success

◆ tfErrPopFirst()

HRESULT tfErrPopFirst ( struct tfErrorHandle ** handle)

Get and clear the first error

◆ tfErrSet()

HRESULT tfErrSet ( HRESULT code,
const char * msg,
int line,
const char * file,
const char * func )

Set the error indicator. If there is a previous error indicator, then the previous indicator is moved down the stack.

◆ tfErrStr()

HRESULT tfErrStr ( struct tfErrorHandle * handle,
char ** str,
unsigned int * numChars )

Get a string representation of an error.