29 #ifndef _CEGUIExceptions_h_
30 #define _CEGUIExceptions_h_
32 #include "CEGUI/Base.h"
33 #include "CEGUI/String.h"
41 public std::exception,
81 {
return d_filename; }
103 {
return d_function; }
106 const char* what()
const throw();
120 static
void setStdErrEnabled(
bool enabled);
129 static
bool isStdErrEnabled();
133 static
bool d_stdErrEnabled;
161 const
String& filename = "",
163 const
String& function = "");
211 const String& file =
"unknown",
int line = 0,
212 const String&
function =
"unknown") :
213 Exception(message,
"CEGUI::GenericException", file, line, function)
234 #define GenericException(message) \
235 GenericException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME)
269 const String& file =
"unknown",
int line = 0,
270 const String&
function =
"unknown") :
271 Exception(message,
"CEGUI::UnknownObjectException", file, line, function)
292 #define UnknownObjectException(message) \
293 UnknownObjectException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME)
327 const String& file =
"unknown",
int line = 0,
328 const String&
function =
"unknown") :
329 Exception(message,
"CEGUI::InvalidRequestException", file, line, function)
350 #define InvalidRequestException(message) \
351 InvalidRequestException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME)
385 const String& file =
"unknown",
int line = 0,
386 const String&
function =
"unknown") :
387 Exception(message,
"CEGUI::FileIOException", file, line, function)
408 #define FileIOException(message) \
409 FileIOException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME)
443 const String& file =
"unknown",
int line = 0,
444 const String&
function =
"unknown") :
445 Exception(message,
"CEGUI::RendererException", file, line, function)
466 #define RendererException(message) \
467 RendererException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME)
506 const String& file =
"unknown",
int line = 0,
507 const String&
function =
"unknown") :
508 Exception(message,
"CEGUI::AlreadyExistsException", file, line, function)
529 #define AlreadyExistsException(message) \
530 AlreadyExistsException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME)
564 const String& file =
"unknown",
int line = 0,
565 const String&
function =
"unknown") :
566 Exception(message,
"CEGUI::MemoryException", file, line, function)
587 #define MemoryException(message) \
588 MemoryException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME)
622 const String& file =
"unknown",
int line = 0,
623 const String&
function =
"unknown") :
624 Exception(message,
"CEGUI::NullObjectException", file, line, function)
645 #define NullObjectException(message) \
646 NullObjectException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME)
684 const String& file =
"unknown",
int line = 0,
685 const String&
function =
"unknown") :
686 Exception(message,
"CEGUI::ObjectInUseException", file, line, function)
707 #define ObjectInUseException(message) \
708 ObjectInUseException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME)
742 const String& file =
"unknown",
int line = 0,
743 const String&
function =
"unknown") :
744 Exception(message,
"CEGUI::ScriptException", file, line, function)
765 #define ScriptException(message) \
766 ScriptException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME)
774 #endif // end of guard _CEGUIExceptions_h_
Exception class used when a request was made for an unknown object.
Definition: Exceptions.h:240
Exception class used when none of the other classes are applicable.
Definition: Exceptions.h:182
Definition: MemoryAllocatedObject.h:109
ObjectInUseException(const String &message, const String &file="unknown", int line=0, const String &function="unknown")
Constructor that is responsible for logging the object in use exception by calling the base class...
Definition: Exceptions.h:683
Exception class used when an attempt is made create a named object of a particular type when an objec...
Definition: Exceptions.h:477
ScriptException(const String &message, const String &file="unknown", int line=0, const String &function="unknown")
Constructor that is responsible for logging the script exception by calling the base class...
Definition: Exceptions.h:741
Exception class used when a file handling problem occurs.
Definition: Exceptions.h:356
NullObjectException(const String &message, const String &file="unknown", int line=0, const String &function="unknown")
Constructor that is responsible for logging the null object exception by calling the base class...
Definition: Exceptions.h:621
Exception class used for problems in the rendering subsystem classes.
Definition: Exceptions.h:414
Exception class used when some required object or parameter is null.
Definition: Exceptions.h:593
const String & getFileName(void) const
Return a reference to the String object containing the name of the file where the exception occurred...
Definition: Exceptions.h:80
RendererException(const String &message, const String &file="unknown", int line=0, const String &function="unknown")
Constructor that is responsible for logging the renderer exception by calling the base class...
Definition: Exceptions.h:442
const String & getName() const
Return a reference to the String object containing the exception name (i.e. class type)...
Definition: Exceptions.h:68
int getLine(void) const
Return the line number where the exception occurred.
Definition: Exceptions.h:90
const String & getMessage(void) const
Return a reference to the String object describing the reason for the exception being thrown...
Definition: Exceptions.h:57
MemoryException(const String &message, const String &file="unknown", int line=0, const String &function="unknown")
Constructor that is responsible for logging the memory exception by calling the base class...
Definition: Exceptions.h:563
InvalidRequestException(const String &message, const String &file="unknown", int line=0, const String &function="unknown")
Constructor that is responsible for logging the invalid request exception by calling the base class...
Definition: Exceptions.h:326
UnknownObjectException(const String &message, const String &file="unknown", int line=0, const String &function="unknown")
Constructor that is responsible for logging the unknown object exception by calling the base class...
Definition: Exceptions.h:268
Root exception class used within the GUI system.
Definition: Exceptions.h:40
GenericException(const String &message, const String &file="unknown", int line=0, const String &function="unknown")
Constructor that is responsible for logging the generic exception by calling the base class...
Definition: Exceptions.h:210
Exception class used when some attempt to delete, remove, or otherwise invalidate some object that is...
Definition: Exceptions.h:655
Exception class used when a memory handling error is detected.
Definition: Exceptions.h:535
const String & getFunctionName(void) const
Return a reference to the String object containing the name of the function where the exception occur...
Definition: Exceptions.h:102
Exception class used when some impossible request was made of the system.
Definition: Exceptions.h:298
FileIOException(const String &message, const String &file="unknown", int line=0, const String &function="unknown")
Constructor that is responsible for logging the file IO exception by calling the base class...
Definition: Exceptions.h:384
AlreadyExistsException(const String &message, const String &file="unknown", int line=0, const String &function="unknown")
Constructor that is responsible for logging the already exists exception by calling the base class...
Definition: Exceptions.h:505
String class used within the GUI system.
Definition: String.h:62
Exception class used for issues in scripting subsystem.
Definition: Exceptions.h:713