This is the exception thrown by most Mezzanine systems that can throw exceptions. More...
#include <exception.h>
Public Member Functions | |
ExceptionBase (const Mezzanine::String &TypeName, const Mezzanine::String &JavaTypeName, const Mezzanine::String &Message, const Mezzanine::String &SrcFunction, const Mezzanine::String &SrcFile, const Mezzanine::Whole &FileLine) | |
Simple Constructor. More... | |
virtual | ~ExceptionBase () throw () |
Class destructor. | |
Mezzanine::String | GetCompleteMessage () const throw () |
Constructs the complete message from all the information provided about the exception. More... | |
virtual Mezzanine::Whole | GetExceptionCode () const =0 throw () |
Gets the exception code for this exception. More... | |
const Mezzanine::String & | GetExceptionJavaTypeName () const throw () |
Gets the name of the exception type. More... | |
const Mezzanine::String & | GetExceptionTypeName () const throw () |
Gets the name of the exception type. More... | |
const Mezzanine::String & | GetFile () const throw () |
Gets the file of the exception. More... | |
const Mezzanine::String & | GetFunction () const throw () |
Gets the function of the exception. More... | |
const Mezzanine::Whole & | GetLine () const throw () |
Gets the line number of the exception. More... | |
virtual const char * | what () const throw () |
Retrieves the error message. More... | |
This is the exception thrown by most Mezzanine systems that can throw exceptions.
Definition at line 59 of file exception.h.
This enum provides mapping/naming for all the core Mezzanine.
This system might superficially look convoluted. It is designed to make capturing as much detail about problems as they occur.
The numbers listed here must be unique to each exception. If an error code does not identify the problem exactly it should be considered 'Unknown' for as much as it does specify. For example, if there is an error opening a file for reading and writing, and we don't know why it failed, using IO_EXCEPTION would make sense
Enumerator | |
---|---|
FIRST_EXCEPTION |
To allow some inspection of the Exception system this can be use to identify the lower numbered Exception. |
IO_EXCEPTION |
Thrown when there was an issue with IO but very little was known about it. |
IO_FILE_EXCEPTION |
Thrown when there is an unknown issue with a file. |
IO_FILE_READ_EXCEPTION |
Thrown when a file could not be read and permissions seem to not be an issue (Filesystem/hardware issue? |
IO_FILE_WRITE_EXCEPTION |
Thrown when a file could not be written and perimssions seem not to be an issue. |
IO_FILE_NOT_FOUND_EXCEPTION |
Thrown when a file was expected to be there, but was not. |
IO_FILE_PERMISSION_EXCEPTION |
Thrown when permission was denied to a file. |
IO_DIRECTORY_EXCEPTION |
Thrown when there is an unknown issue with a file. |
IO_DIRECTORY_READ_EXCEPTION |
Thrown when a directory could be read and it wasn't a permission issue. |
IO_DIRECTORY_WRITE_EXCEPTION |
Thrown when a directory could be written to and it wasn't a permission issue. |
IO_DIRECTORY_NOT_FOUND_EXCEPTION |
Thrown when a directory was expected to be there, but was not. |
IO_DIRECTORY_PERMISSION_EXCEPTION |
Thrown when permission is denied to a directory. |
IO_NETWORK_EXCEPTION |
Thrown when something unknown causes network IO to fail. |
IO_NETWORK_READ_EXCEPTION |
Thrown when data could not be read from the network (downloads) |
IO_NETWORK_WRITE_EXCEPTION |
Thrown when data could not be read from the network (iloads) |
IO_NETWORK_NOT_FOUND_EXCEPTION |
Thrown when no network connection is available. |
IO_NETWORK_URL_EXCEPTION |
Thrown when an address is invalid or could not be found. |
IO_NETWORK_PERMISSION_EXCEPTION |
Thrown when permision was denied to a network interface or network resource. |
IO_WRITE_EXCEPTION |
Thrown when a write is happening but something has prevented the underlying code from knowing what was writing. |
IO_READ_EXCEPTION |
Thrown when a read is happening but something has prevented the underlying code from knowing what was reading. |
II_EXCEPTION |
Thrown when an unknown error with using an Identifier and it is invalid. |
II_IDENTITY_INVALID_EXCEPTION |
Thrown when the identity string wasn't valid at all. |
II_IDENTITY_NOT_FOUND_EXCEPTION |
Thrown when the requested identity could not be found. |
II_DUPLICATE_IDENTITY_EXCEPTION |
Thrown when duplicates of teh same identity string exist. |
MM_EXCEPTION |
Thrown when an unknown memory management exception occurs. |
MM_OUT_OF_MEMORY_EXCEPTION |
Thrown when A memory allocation was attempted and failed. |
MM_OUT_OF_BOUNDS_EXCEPTION |
Thrown when attempted to access something that really should note be accessed. |
SYNTAX_ERROR_EXCEPTION |
Thrown when some kind of syntax exception. |
SYNTAX_ERROR_EXCEPTION_XML |
Thrown when and XML document is being parsed but is invalid. |
SYNTAX_ERROR_EXCEPTION_XPATH |
Thrown when an XPath query is being parsed but is invalid. |
SYNTAX_ERROR_EXCEPTION_LUA |
Thrown when lua code in incorrect. |
SCRIPT_EXCEPTION |
Thrown when an unknown error happens with a script. |
SCRIPT_EXCEPTION_LUA |
Thrown when an unknown error happens in a Lua script. |
SCRIPT_EXCEPTION_LUA_YIELD |
Thrown when Lua returns a yield and it should not have. |
SCRIPT_EXCEPTION_LUA_RUNTIME |
Thrown when a Lua script has a runtime error. |
SCRIPT_EXCEPTION_LUA_ERRERR |
Thrown when Lua has an error handling an error. |
PARAMETERS_EXCEPTION |
Thrown when parameters are checked at runtime and found invalid. |
PARAMETERS_CAST_EXCEPTION |
Thrown when a pointer parameter is checked at runtime and cannot be cast as expected. |
PARAMETERS_RANGE_EXCEPTION |
Thrown when a passed parameter is checked at runtime and not in the expected range. |
ARITHMETIC_EXCEPTION |
Thrown when Math has failed. |
INVALID_VERSION_EXCEPTION |
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing. |
INVALID_STATE_EXCEPTION |
Thrown when the available information should have worked but failed for unknown reasons. |
RENDERINGAPI_EXCEPTION |
Thrown when the graphics card/DirectX/OpenGL fail. |
RT_ASSERTION_EXCEPTION |
Thrown when a rutime assertion could have been Thrown. |
INTERNAL_EXCEPTION |
Thrown when an unknown internal error occurred. |
NOT_IMPLEMENTED_EXCEPTION |
Thrown when we just have not coded a thing yet, but we knew what the API should look like. |
INVALID_ASSIGNMENT |
Thrown when a complex class is assigned to itself or other invalid assignments occur. |
LAST_EXCEPTION |
To allow some inspection of the Exception system this can be use to identify the highest numbered Exception. |
Definition at line 70 of file exception.h.
Mezzanine::ExceptionBase::ExceptionBase | ( | const Mezzanine::String & | TypeName, |
const Mezzanine::String & | JavaTypeName, | ||
const Mezzanine::String & | Message, | ||
const Mezzanine::String & | SrcFunction, | ||
const Mezzanine::String & | SrcFile, | ||
const Mezzanine::Whole & | FileLine | ||
) |
Simple Constructor.
TypeName | The name of the type of exception being thrown. |
JavaTypeName | What Java exception Corresponds to this? |
Message | A basic description of the error. |
SrcFunction | The name of the function from which this originated. |
SrcFile | The name of the file from which this originated. |
FileLine | The line on the named file from which this originated. |
Don't call this, use MEZZ_EXCEPTION to throw these, it is much simpler. This constructor might change with time to include more data.
Definition at line 54 of file exception.cpp.
String Mezzanine::ExceptionBase::GetCompleteMessage | ( | ) | const | |
throw | ( | |||
) |
Constructs the complete message from all the information provided about the exception.
Definition at line 96 of file exception.cpp.
|
pure virtual |
Gets the exception code for this exception.
Implemented in Mezzanine::InvalidAssignment, Mezzanine::NotImplementedException, Mezzanine::InternalException, Mezzanine::RuntimeAssertionException, Mezzanine::RenderingAPIException, Mezzanine::InvalidStateException, Mezzanine::InvalidVersionException, Mezzanine::ArithmeticException, Mezzanine::ParametersRangeException, Mezzanine::ParametersCastException, Mezzanine::ParametersException, Mezzanine::ScriptLuaErrErrException, Mezzanine::ScriptLuaRuntimeException, Mezzanine::ScriptLuaYieldException, Mezzanine::ScriptLuaException, Mezzanine::ScriptException, Mezzanine::SyntaxErrorLuaException, Mezzanine::SyntaxErrorXPathException, Mezzanine::SyntaxErrorXMLException, Mezzanine::SyntaxErrorException, Mezzanine::MemoryOutOfBoundsException, Mezzanine::OutOfMemoryException, Mezzanine::MemoryManagementException, Mezzanine::InstanceIdentityDuplicateException, Mezzanine::InstanceIdentityNotFoundException, Mezzanine::InstanceIdentityInvalidException, Mezzanine::InstanceIdentityException, Mezzanine::IOReadException, Mezzanine::IOWriteException, Mezzanine::NetworkPermissionException, Mezzanine::NetworkURLException, Mezzanine::NetworkNotFoundException, Mezzanine::NetworkWriteException, Mezzanine::NetworkReadException, Mezzanine::NetworkException, Mezzanine::DirectoryPermissionException, Mezzanine::DirectoryNotFoundException, Mezzanine::DirectoryWriteException, Mezzanine::DirectoryReadException, Mezzanine::DirectoryException, Mezzanine::FilePermissionException, Mezzanine::FileNotFoundException, Mezzanine::FileWriteException, Mezzanine::FileReadException, Mezzanine::FileException, and Mezzanine::IOException.
ConstString & Mezzanine::ExceptionBase::GetExceptionJavaTypeName | ( | ) | const | |
throw | ( | |||
) |
Gets the name of the exception type.
Definition at line 84 of file exception.cpp.
ConstString & Mezzanine::ExceptionBase::GetExceptionTypeName | ( | ) | const | |
throw | ( | |||
) |
Gets the name of the exception type.
Definition at line 81 of file exception.cpp.
ConstString & Mezzanine::ExceptionBase::GetFile | ( | ) | const | |
throw | ( | |||
) |
Gets the file of the exception.
Definition at line 90 of file exception.cpp.
ConstString & Mezzanine::ExceptionBase::GetFunction | ( | ) | const | |
throw | ( | |||
) |
Gets the function of the exception.
Definition at line 87 of file exception.cpp.
const Whole & Mezzanine::ExceptionBase::GetLine | ( | ) | const | |
throw | ( | |||
) |
Gets the line number of the exception.
Definition at line 93 of file exception.cpp.
|
virtual |
Retrieves the error message.
Definition at line 113 of file exception.cpp.