TMCException Class Reference
[MCCore]
List of all members.
Detailed Description
TMCException is the class used to deal with C++ and system exceptions. You should NEVER call throw without creating a TMCException. There are several useful macros that throw exceptions: ThrowIfNil(), ThrowIfNoMem(), or ThrowIfError(). Or you can use: throw TMCException(...);
For more information please refer to the "Failure Handling" chapter in the overview of the SDK
Constructor & Destructor Documentation
TMCException::TMCException |
( |
const MCErr |
error = kNoErr , |
|
|
const char * |
file = 0 , |
|
|
const int |
line = 0 | |
|
) |
| | |
constructor: the standard errors can be found in MCStatusCode.h you can create your own errors: it is best to use MAKE_MCCOMErr with ExtensionModule for that purpose.
- Note:
- when using kNoErr, there wont be a warning message!
TMCException::TMCException |
( |
const MCErr |
error, |
|
|
TMCString * |
errorString, |
|
|
const char * |
file = 0 , |
|
|
const int |
line = 0 | |
|
) |
| | |
error and error string constructor The exception will OWN the given string
We do not want to allocate a new string in the new exception =>copies the e.fErrorString pointer into this.fErrorString and sets e.fErrorString to null.
TMCException::~TMCException |
( |
void |
|
) |
|
Member Function Documentation
MCErr TMCException::GetError |
( |
void |
|
) |
const [inline] |
const TMCString* TMCException::GetErrorString |
( |
|
) |
const [inline] |
TMCException::operator MCErr |
( |
void |
|
) |
const [inline] |
void TMCException::SetError |
( |
const MCErr |
err |
) |
[inline] |
virtual const char* TMCException::what |
( |
|
) |
const [inline, virtual] |
Member Data Documentation
The documentation for this class was generated from the following file: