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

CP_Exceptions.h File Reference


Defines

#define CP_ThrowErr(inStatus)   CP_ThrowErr_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowIfNULL(inStatus)   CP_ThrowIfNULL_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowIfResFail(inStatus)   CP_ThrowIfResFail_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowRuntime(inMsg)   CP_ThrowRuntime_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowOutOfRange(inMsg)   CP_ThrowOutOfRange_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowOverflow(inMsg)   CP_ThrowOverflow_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowUnderflow(inMsg)   CP_ThrowUnderflow_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowInvalidArgument(inMsg)   CP_ThrowInvalidArgument_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowLength(inMsg)   CP_ThrowLength_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowIfOSErr(inStatus)   CP_ThrowIfOSErr_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowBadCast(inMsg)   CP_ThrowBadCast_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowBounds(inMsg)   CP_ThrowBounds_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowNotFound(inMsg)   CP_ThrowNotFound_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowIfMemFail(inStatus)   CP_ThrowIfMemFail_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowIfResErr(inStatus)   CP_ThrowIfResErr_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowIfMemErr(inStatus)   CP_ThrowIfMemErr_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowIfCFFail(inStatus)   CP_ThrowIfCFFail_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
#define CP_ThrowIfQDErr(inStatus)   CP_ThrowIfQDErr_( inStatus, __FUNCTION__, __LINE__, __FILE__ )

Functions

CP_EXPORT void CP_ThrowErr_ (OSStatus inStatus, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowIfNULL_ (const void *inPtr, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowIfResFail_ (const void *inPtr, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowRuntime_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowOutOfRange_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowOverflow_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowUnderflow_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowInvalidArgument_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowLength_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowBadCast_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowBounds_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowNotFound_ (const CP_String &inMessage, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowIfOSErr_ (OSStatus inStatus, const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowIfMemFail_ (const void *inPtr, const char *inFunction, int inLine, const char *inFile)
void CP_ThrowIfResErr_ (const char *inFunction, int inLine, const char *inFile)
void CP_ThrowIfMemErr_ (const char *inFunction, int inLine, const char *inFile)
CP_EXPORT void CP_ThrowIfCFFail_ (const void *inPtr, const char *inFunction, int inLine, const char *inFile)
template<class Exception>
void Throw ()
template<class ErrorClass>
ErrorCodeThrower< ErrorClass > & CP_ErrorCodeThrower ()
template<class ErrorClass, typename ErrorClassTraits< ErrorClass >::ErrorNumber number>
void CP_RegisterErrorCode ()
template<class ErrorClass>
void CP_ThrowErrorCode (ErrorClass error)
template<SInt32 error>
void CP_RegisterOSStatus ()
void CP_ThrowOSStatus (OSStatus)

Define Documentation

#define CP_ThrowErr (  inStatus   )     CP_ThrowErr_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowIfNULL (  inStatus   )     CP_ThrowIfNULL_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowIfResFail (  inStatus   )     CP_ThrowIfResFail_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowRuntime (  inMsg   )     CP_ThrowRuntime_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowOutOfRange (  inMsg   )     CP_ThrowOutOfRange_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowOverflow (  inMsg   )     CP_ThrowOverflow_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowUnderflow (  inMsg   )     CP_ThrowUnderflow_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowInvalidArgument (  inMsg   )     CP_ThrowInvalidArgument_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowLength (  inMsg   )     CP_ThrowLength_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowIfOSErr (  inStatus   )     CP_ThrowIfOSErr_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowBadCast (  inMsg   )     CP_ThrowBadCast_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowBounds (  inMsg   )     CP_ThrowBounds_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowNotFound (  inMsg   )     CP_ThrowNotFound_( inMsg, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowIfMemFail (  inStatus   )     CP_ThrowIfMemFail_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowIfResErr (  inStatus   )     CP_ThrowIfResErr_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowIfMemErr (  inStatus   )     CP_ThrowIfMemErr_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowIfCFFail (  inStatus   )     CP_ThrowIfCFFail_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
 

#define CP_ThrowIfQDErr (  inStatus   )     CP_ThrowIfQDErr_( inStatus, __FUNCTION__, __LINE__, __FILE__ )
 


Function Documentation

CP_EXPORT 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

CP_EXPORT 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

CP_EXPORT 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

CP_EXPORT 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

CP_EXPORT 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

CP_EXPORT 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

CP_EXPORT 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

CP_EXPORT 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

CP_EXPORT 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

CP_EXPORT 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

CP_EXPORT 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

CP_EXPORT 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_ThrowIfOSErr_ (  OSStatus  inStatus,
const char *  inFunction,
int  inLine,
const char *  inFile
) 
 

CP_EXPORT 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_ThrowIfResErr_ (  const char *  inFunction,
int  inLine,
const char *  inFile
) 
 

void CP_ThrowIfMemErr_ (  const char *  inFunction,
int  inLine,
const char *  inFile
) 
 

CP_EXPORT 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

template<class Exception>
void Throw (   ) 
 

template<class ErrorClass>
ErrorCodeThrower<ErrorClass>& CP_ErrorCodeThrower (   ) 
 

template<class ErrorClass, typename ErrorClassTraits< ErrorClass >::ErrorNumber number>
void CP_RegisterErrorCode (   ) 
 

template<class ErrorClass>
void CP_ThrowErrorCode (  ErrorClass  error  ) 
 

template<SInt32 error>
void CP_RegisterOSStatus (   ) 
 

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 Tue Sep 20 20:21:27 2005 for CPLAT_MacOS by  doxygen 1.4.0