Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_Exceptions.cpp File Reference


Functions

CPLAT_Begin_Namespace_CPLAT
void 
CP_ThrowIfNULL_ (const void *inPtr, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowIfResFail_ (const void *inPtr, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowIfMemFail_ (const void *inPtr, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowIfCFFail_ (const void *inPtr, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowErr_ (OSStatus inStatus, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowRuntime_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowOutOfRange_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowOverflow_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowUnderflow_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowInvalidArgument_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowLength_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowBadCast_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowBounds_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowNotFound_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowOSStatus (OSStatus error)

Function Documentation

CPLAT_Begin_Namespace_CPLAT void CP_ThrowIfNULL_ const void *  inPtr,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a CP_MemoryException if the passed in inPtr is NULL.

Parameters:
inPtr The memory pointer we are checking for NULLness.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowIfResFail_ const void *  inPtr,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a CP_MemoryException if the passed in inPtr is NULL. If ResError() returns anything other than CP_noErr, then a CP_OSErrorException is thrown.

Parameters:
inPtr The memory pointer we are checking for NULLness.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowIfMemFail_ const void *  inPtr,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a CP_MemoryException if the passed in inPtr is NULL or MemError() returns memFullErr. Otherwise, if MemError() returns anything other than CP_noErr, then a CP_OSErrorException is thrown.

Parameters:
inPtr The memory pointer we are checking for NULLness.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowIfCFFail_ const void *  inPtr,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a CP_OSErrorException if the passed in inPtr is NULL.

Parameters:
inPtr The memory pointer we are checking for NULLness.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowErr_ OSStatus  inStatus,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called when an platforms os error occurs

Parameters:
inStatus The OS error that has occurred.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowRuntime_ const CP_String inMessage,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a std::runtime_error exception.

Parameters:
inMessage Any message passed to the std exception.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowOutOfRange_ const CP_String inMessage,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a std::out_of_range exception.

Parameters:
inMessage Any message passed to the std exception.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowOverflow_ const CP_String inMessage,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a std::overflow exception.

Parameters:
inMessage Any message passed to the std exception.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowUnderflow_ const CP_String inMessage,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a std::underflow exception.

Parameters:
inMessage Any message passed to the std exception.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowInvalidArgument_ const CP_String inMessage,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a std::invalid_argument exception.

Parameters:
inMessage Any message passed to the std exception.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowLength_ const CP_String inMessage,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a std::length exception.

Parameters:
inMessage Any message passed to the std exception.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowBadCast_ const CP_String inMessage,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a std::bad_cast exception.

Parameters:
inMessage Any message passed to the std exception.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowBounds_ const CP_String inMessage,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a CP_BoundsException exception.

Parameters:
inMessage Any message passed to the std exception.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowNotFound_ const CP_String inMessage,
const char *  inFunction,
int  inLine,
const char *  inFile
 

Routine that is called from our exception macros to throw a CP_NotFoundException exception.

Parameters:
inMessage Any message passed to the std exception.
inFunction The function that called us. This only valid in CP_Debug builds.
inLine The line in the file called us. This only valid in CP_Debug builds.
inFile The file that called us. This only valid in CP_Debug builds.
Returns:
void

void CP_ThrowOSStatus OSStatus  error  ) 
 

Throw the OSStatus code represented by the passed in inError.

Parameters:
inError The OSSstatus code being thrown.
Returns:
void


Generated on Sat Sep 17 20:01:14 2005 for CPLAT by  doxygen 1.4.0