OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions | Variables
ErrorHandling.hpp File Reference

Go to the source code of this file.

Macros

#define kGenericError   -1
 
#define SetErrorMessageAndBailIfNil(theArg, theMessage)
 
#define SetErrorMessageAndBail(theMessage)
 
#define SetErrorMessageAndLongIntAndBail(theMessage, theLongInt)
 
#define SetErrorMessageAndLongIntAndBailIfError(theErrCode, theMessage, theLongInt)
 
#define SetErrorMessageCStrLongIntAndBailIfError(theErrCode, theMessage, theCStr, theLongInt)
 
#define SetErrorMessageAndCStrAndBail(theMessage, theCStr)
 
#define SetErrorMessageAndBailIfError(theErrCode, theMessage)
 
#define SetErrorMessageAndLongIntAndBailIfNil(theArg, theMessage, theLongInt)
 
#define BailIfError(theErrCode)
 
#define SetErrCodeAndBail(theErrCode)
 
#define SetErrorCodeAndMessageAndBail(theErrCode, theMessage)
 
#define BailNow()
 

Functions

void SetErrorMessage (const char *theErrorMessage)
 
void SetErrorMessageAndAppendLongInt (const char *theErrorMessage, const long theLongInt)
 
void SetErrorMessageAndCStrAndLongInt (const char *theErrorMessage, const char *theCStr, const long theLongInt)
 
void SetErrorMessageAndCStr (const char *theErrorMessage, const char *theCStr)
 
void AppendCStrToErrorMessage (const char *theErrorMessage)
 
void AppendLongIntToErrorMessage (const long theLongInt)
 
char * GetErrorMessage (void)
 
OSErr GetErrorMessageInNewHandle (Handle *inoutHandle)
 
OSErr GetErrorMessageInExistingHandle (Handle inoutHandle)
 
OSErr AppendErrorMessageToHandle (Handle inoutHandle)
 

Variables

char * gErrorMessage
 

Macro Definition Documentation

#define BailIfError (   theErrCode)
Value:
{ \
if ((theErrCode) != noErr) \
{ \
goto EXITPOINT; \
} \
}

Definition at line 113 of file ErrorHandling.hpp.

#define BailNow ( )
Value:
{ \
errCode = kGenericError; \
goto EXITPOINT; \
}

Definition at line 138 of file ErrorHandling.hpp.

#define kGenericError   -1

Definition at line 6 of file ErrorHandling.hpp.

#define SetErrCodeAndBail (   theErrCode)
Value:
{ \
errCode = theErrCode; \
\
goto EXITPOINT; \
}

Definition at line 122 of file ErrorHandling.hpp.

#define SetErrorCodeAndMessageAndBail (   theErrCode,
  theMessage 
)
Value:
{ \
SetErrorMessage(theMessage); \
errCode = theErrCode; \
goto EXITPOINT; \
}

Definition at line 130 of file ErrorHandling.hpp.

#define SetErrorMessageAndBail (   theMessage)
Value:
{ \
SetErrorMessage(theMessage); \
errCode = kGenericError; \
goto EXITPOINT; \
}

Definition at line 45 of file ErrorHandling.hpp.

#define SetErrorMessageAndBailIfError (   theErrCode,
  theMessage 
)
Value:
{ \
if (theErrCode != noErr) \
{ \
SetErrorMessage(theMessage); \
errCode = theErrCode; \
goto EXITPOINT; \
} \
}

Definition at line 91 of file ErrorHandling.hpp.

#define SetErrorMessageAndBailIfNil (   theArg,
  theMessage 
)
Value:
{ \
if (theArg == nil) \
{ \
SetErrorMessage(theMessage); \
errCode = kGenericError; \
goto EXITPOINT; \
} \
}

Definition at line 34 of file ErrorHandling.hpp.

#define SetErrorMessageAndCStrAndBail (   theMessage,
  theCStr 
)
Value:
{ \
SetErrorMessageAndCStr(theMessage,theCStr); \
errCode = kGenericError; \
goto EXITPOINT; \
}

Definition at line 83 of file ErrorHandling.hpp.

#define SetErrorMessageAndLongIntAndBail (   theMessage,
  theLongInt 
)
Value:
{ \
SetErrorMessageAndAppendLongInt(theMessage,theLongInt); \
errCode = kGenericError; \
goto EXITPOINT; \
}

Definition at line 53 of file ErrorHandling.hpp.

#define SetErrorMessageAndLongIntAndBailIfError (   theErrCode,
  theMessage,
  theLongInt 
)
Value:
{ \
if (theErrCode != noErr) \
{ \
SetErrorMessageAndAppendLongInt(theMessage,theLongInt); \
errCode = theErrCode; \
goto EXITPOINT; \
} \
}

Definition at line 61 of file ErrorHandling.hpp.

#define SetErrorMessageAndLongIntAndBailIfNil (   theArg,
  theMessage,
  theLongInt 
)
Value:
{ \
if (theArg == nil) \
{ \
SetErrorMessageAndAppendLongInt(theMessage,theLongInt); \
errCode = kGenericError; \
goto EXITPOINT; \
} \
}

Definition at line 102 of file ErrorHandling.hpp.

#define SetErrorMessageCStrLongIntAndBailIfError (   theErrCode,
  theMessage,
  theCStr,
  theLongInt 
)
Value:
{ \
if (theErrCode != noErr) \
{ \
SetErrorMessageAndCStrAndLongInt(theMessage,theCStr,theLongInt); \
errCode = theErrCode; \
goto EXITPOINT; \
} \
}

Definition at line 72 of file ErrorHandling.hpp.

Function Documentation

void AppendCStrToErrorMessage ( const char *  theErrorMessage)

Definition at line 107 of file ErrorHandling.cpp.

OSErr AppendErrorMessageToHandle ( Handle  inoutHandle)

Definition at line 152 of file ErrorHandling.cpp.

void AppendLongIntToErrorMessage ( const long  theLongInt)

Definition at line 116 of file ErrorHandling.cpp.

char* GetErrorMessage ( void  )

Definition at line 123 of file ErrorHandling.cpp.

OSErr GetErrorMessageInExistingHandle ( Handle  inoutHandle)

Definition at line 140 of file ErrorHandling.cpp.

OSErr GetErrorMessageInNewHandle ( Handle *  inoutHandle)

Definition at line 129 of file ErrorHandling.cpp.

void SetErrorMessage ( const char *  theErrorMessage)

Definition at line 72 of file ErrorHandling.cpp.

void SetErrorMessageAndAppendLongInt ( const char *  theErrorMessage,
const long  theLongInt 
)

Definition at line 81 of file ErrorHandling.cpp.

void SetErrorMessageAndCStr ( const char *  theErrorMessage,
const char *  theCStr 
)

Definition at line 98 of file ErrorHandling.cpp.

void SetErrorMessageAndCStrAndLongInt ( const char *  theErrorMessage,
const char *  theCStr,
const long  theLongInt 
)

Definition at line 89 of file ErrorHandling.cpp.

Variable Documentation

char* gErrorMessage

Definition at line 67 of file ErrorHandling.cpp.