inc/errCatch.h File Reference

#include "dystring.h"

Include dependency graph for errCatch.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  errCatch

Defines

#define errCatchStart(e)   (errCatchPushHandlers(e) && setjmp(e->jmpBuf) == 0)

Functions

errCatcherrCatchNew ()
void errCatchFree (struct errCatch **pErrCatch)
boolean errCatchPushHandlers (struct errCatch *errCatch)
void errCatchEnd (struct errCatch *errCatch)
boolean errCatchFinish (struct errCatch **pErrCatch)


Define Documentation

#define errCatchStart (  )     (errCatchPushHandlers(e) && setjmp(e->jmpBuf) == 0)

Definition at line 38 of file errCatch.h.

Referenced by htmlPageForwardedNoAbort(), qaPageFromForm(), and qaPageGet().


Function Documentation

void errCatchEnd ( struct errCatch errCatch  ) 

Definition at line 70 of file errCatch.c.

References errAbort(), errCatchStack, errCatch::next, popAbortHandler(), and popWarnHandler().

Referenced by errCatchFinish(), htmlPageForwardedNoAbort(), qaPageFromForm(), and qaPageGet().

00072 {
00073 popWarnHandler();
00074 popAbortHandler();
00075 if (errCatch != errCatchStack)
00076    errAbort("Mismatch betweene errCatch and errCatchStack");
00077 errCatchStack = errCatch->next;
00078 }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean errCatchFinish ( struct errCatch **  pErrCatch  ) 

Definition at line 80 of file errCatch.c.

References errCatchEnd(), errCatchFree(), FALSE, TRUE, and warn().

00084 {
00085 struct errCatch *errCatch = *pErrCatch;
00086 boolean ok = TRUE;
00087 if (errCatch != NULL)
00088     {
00089     errCatchEnd(errCatch);
00090     if (errCatch->gotError)
00091         {
00092         ok = FALSE;
00093         warn(errCatch->message->string);
00094         }
00095     errCatchFree(pErrCatch);
00096     }
00097 return ok;
00098 }

Here is the call graph for this function:

void errCatchFree ( struct errCatch **  pErrCatch  ) 

Definition at line 34 of file errCatch.c.

References dyStringFree, freez(), and errCatch::message.

Referenced by errCatchFinish(), htmlPageForwardedNoAbort(), qaPageFromForm(), and qaPageGet().

00036 {
00037 struct errCatch *errCatch = *pErrCatch;
00038 if (errCatch != NULL)
00039     {
00040     dyStringFree(&errCatch->message);
00041     freez(pErrCatch);
00042     }
00043 }

Here is the call graph for this function:

Here is the caller graph for this function:

struct errCatch* errCatchNew (  )  [read]

Definition at line 25 of file errCatch.c.

References AllocVar, dyStringNew, and errCatch::message.

Referenced by htmlPageForwardedNoAbort(), qaPageFromForm(), and qaPageGet().

00027 {
00028 struct errCatch *errCatch;
00029 AllocVar(errCatch);
00030 errCatch->message = dyStringNew(0);
00031 return errCatch;
00032 }

Here is the caller graph for this function:

boolean errCatchPushHandlers ( struct errCatch errCatch  ) 

Definition at line 61 of file errCatch.c.

References errCatchAbortHandler(), errCatchStack, errCatchWarnHandler(), pushAbortHandler(), pushWarnHandler(), slAddHead, and TRUE.

00063 {
00064 pushAbortHandler(errCatchAbortHandler);
00065 pushWarnHandler(errCatchWarnHandler);
00066 slAddHead(&errCatchStack, errCatch);
00067 return TRUE;
00068 }

Here is the call graph for this function:


Generated on Tue Dec 25 18:54:15 2007 for blat by  doxygen 1.5.2