29 #ifndef _CEGUIExceptions_h_
30 #define _CEGUIExceptions_h_
32 #include "CEGUI/Base.h"
33 #include "CEGUI/String.h"
40 class CEGUIEXPORT Exception :
41 public std::exception,
42 public AllocatedObject<Exception>
46 virtual ~Exception(
void) throw();
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)
240 class CEGUIEXPORT UnknownObjectException :
public Exception
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)
298 class CEGUIEXPORT InvalidRequestException :
public Exception
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)
356 class CEGUIEXPORT FileIOException :
public Exception
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)
414 class CEGUIEXPORT RendererException :
public Exception
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)
477 class CEGUIEXPORT AlreadyExistsException :
public Exception
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)
535 class CEGUIEXPORT MemoryException :
public Exception
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)
593 class CEGUIEXPORT NullObjectException :
public Exception
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)
655 class CEGUIEXPORT ObjectInUseException :
public Exception
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)
713 class CEGUIEXPORT ScriptException :
public Exception
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 none of the other classes are applicable.
Definition: cegui/include/CEGUI/Exceptions.h:182
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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/Exceptions.h:683
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/Exceptions.h:741
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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/Exceptions.h:621
const String & getFileName(void) const
Return a reference to the String object containing the name of the file where the exception occurred...
Definition: debian/tmp/usr/include/cegui-0.8.4/CEGUI/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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/Exceptions.h:442
const String & getName() const
Return a reference to the String object containing the exception name (i.e. class type)...
Definition: debian/tmp/usr/include/cegui-0.8.4/CEGUI/Exceptions.h:68
int getLine(void) const
Return the line number where the exception occurred.
Definition: debian/tmp/usr/include/cegui-0.8.4/CEGUI/Exceptions.h:90
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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/Exceptions.h:268
Root exception class used within the GUI system.
Definition: cegui/include/CEGUI/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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/Exceptions.h:210
const String & getFunctionName(void) const
Return a reference to the String object containing the name of the function where the exception occur...
Definition: debian/tmp/usr/include/cegui-0.8.4/CEGUI/Exceptions.h:102
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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/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: debian/tmp/usr/include/cegui-0.8.4/CEGUI/Exceptions.h:505
String class used within the GUI system.
Definition: cegui/include/CEGUI/String.h:62