MorePalmOS
A development library for developing Palm OS applications

MoreErrorMgr.h File Reference

Functions and macros for debugging and flow control. More...

#include "MorePrefix.h"
#include "MoreTypes.h"
#include <ErrorBase.h>

Include dependency graph for MoreErrorMgr.h:

Include dependency graph

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

Included by dependency graph

Go to the source code of this file.


Defines

#define merr_checkf(b)   ErrFatalDisplayIf( !( b ), "Assertion failed.")
#define merr_ncheckf(b)   ErrFatalDisplayIf( b, "Assertion failed.")
#define merr_checkp(b)   ErrNonFatalDisplayIf( !( b ), "Assertion failed.")
#define merr_ncheckp(b)   ErrNonFatalDisplayIf( b, "Assertion failed.")
#define merr_require(success, label, notify)   { if ( !( success ) ) { _NotifyOfError( notify ); goto label; } }
#define merr_reject(failure, label, notify)   { if ( failure ) { _NotifyOfError( notify ); goto label; } }
#define merr_require_action(success, label, action, notify)   { if ( !( success ) ) { _NotifyOfError( notify ); { action; } goto label; } }
#define merr_reject_action(failure, label, action, notify)   { if ( failure ) { _NotifyOfError( notify ); { action; } goto label; } }
#define _NotifyOfError(notify)   { }

Functions

FormType * merr_validate_form_ptr (FormType *formP)
const FormType * merr_validate_const_form_ptr (const FormType *formP)
FrmObjectID_t merr_validate_object_id (const FormType *formP, FrmObjectID_t objID)
FrmObjectIdx_t merr_validate_object_idx (const FormType *formP, FrmObjectIdx_t objIdx)
void * merr_validate_object_ptr (void *objP)
const void * merr_validate_const_object_ptr (const void *objP)
FieldType * merr_validate_field_ptr (FieldType *fieldP)
const FieldType * merr_validate_const_field_ptr (const FieldType *fieldP)
MemHandle merr_validate_memhandle (MemHandle memH)
const MemHandle merr_validate_const_memhandle (const MemHandle memH)

Detailed Description

Functions and macros for debugging and flow control.

Definition in file MoreErrorMgr.h.


Define Documentation

#define _NotifyOfError notify   )     { }
 

Definition at line 299 of file MoreErrorMgr.h.

#define merr_checkf  )     ErrFatalDisplayIf( !( b ), "Assertion failed.")
 

Display a fatal error if condition is false if error level is set to ERROR_CHECK_PARTIAL or ERROR_CHECK_FULL.

Equivalent to assert(condition).

Definition at line 99 of file MoreErrorMgr.h.

#define merr_checkp  )     ErrNonFatalDisplayIf( !( b ), "Assertion failed.")
 

Display a fatal error if condition is false if error level is set to ERROR_CHECK_FULL.

Equivalent to assert(condition).

Definition at line 123 of file MoreErrorMgr.h.

#define merr_ncheckf  )     ErrFatalDisplayIf( b, "Assertion failed.")
 

Display a fatal error if condition is false if error level is set to ERROR_CHECK_PARTIAL or ERROR_CHECK_FULL.

Equivalent to assert(!condition).

Definition at line 111 of file MoreErrorMgr.h.

#define merr_ncheckp  )     ErrNonFatalDisplayIf( b, "Assertion failed.")
 

Display a fatal error if condition is false if error level is set to ERROR_CHECK_FULL.

Equivalent to assert(!condition).

Definition at line 135 of file MoreErrorMgr.h.

#define merr_reject failure,
label,
notify   )     { if ( failure ) { _NotifyOfError( notify ); goto label; } }
 

Definition at line 222 of file MoreErrorMgr.h.

#define merr_reject_action failure,
label,
action,
notify   )     { if ( failure ) { _NotifyOfError( notify ); { action; } goto label; } }
 

Definition at line 228 of file MoreErrorMgr.h.

#define merr_require success,
label,
notify   )     { if ( !( success ) ) { _NotifyOfError( notify ); goto label; } }
 

Definition at line 219 of file MoreErrorMgr.h.

#define merr_require_action success,
label,
action,
notify   )     { if ( !( success ) ) { _NotifyOfError( notify ); { action; } goto label; } }
 

Definition at line 225 of file MoreErrorMgr.h.


Function Documentation

const FieldType* merr_validate_const_field_ptr const FieldType *  fieldP  ) 
 

Definition at line 88 of file MoreErrorMgr.c.

00089 {
00090         _check ( fieldP );
00091         return fieldP;
00092 }

const FormType* merr_validate_const_form_ptr const FormType *  formP  ) 
 

Definition at line 51 of file MoreErrorMgr.c.

00052 {
00053         _check ( ECFrmValidatePtr( formP ) );
00054         return formP;
00055 }

const MemHandle merr_validate_const_memhandle const MemHandle  memH  ) 
 

Definition at line 100 of file MoreErrorMgr.c.

00101 {
00102         _check ( memH );
00103         return memH;
00104 }

const void* merr_validate_const_object_ptr const void *  objP  ) 
 

Definition at line 76 of file MoreErrorMgr.c.

00077 {
00078         _check ( objP );
00079         return objP;
00080 }

FieldType* merr_validate_field_ptr FieldType *  fieldP  ) 
 

Definition at line 82 of file MoreErrorMgr.c.

00083 {
00084         _check ( fieldP );
00085         return fieldP;
00086 }

FormType* merr_validate_form_ptr FormType *  formP  ) 
 

Definition at line 45 of file MoreErrorMgr.c.

00046 {
00047         _check ( ECFrmValidatePtr( formP ) );
00048         return formP;
00049 }

MemHandle merr_validate_memhandle MemHandle  memH  ) 
 

Definition at line 94 of file MoreErrorMgr.c.

00095 {
00096         _check ( memH );
00097         return memH;
00098 }

FrmObjectID_t merr_validate_object_id const FormType *  formP,
FrmObjectID_t  objID
 

Definition at line 57 of file MoreErrorMgr.c.

00058 {
00059         merr_validate_const_form_ptr( formP );
00060         return objID;
00061 }

FrmObjectIdx_t merr_validate_object_idx const FormType *  formP,
FrmObjectIdx_t  objIdx
 

Definition at line 63 of file MoreErrorMgr.c.

00064 {
00065         merr_validate_const_form_ptr( formP );
00066         _check ( objIdx != frmInvalidObjectId );
00067         return objIdx;
00068 }

void* merr_validate_object_ptr void *  objP  ) 
 

Definition at line 70 of file MoreErrorMgr.c.

00071 {
00072         _check ( objP );
00073         return objP;
00074 }

SourceForge.net Logo