29 #ifndef _CEGUIExceptions_h_ 30 #define _CEGUIExceptions_h_ 32 #include "CEGUI/Base.h" 33 #include "CEGUI/String.h" 37 # pragma warning(push) 38 # pragma warning(disable : 4275) 47 public std::exception,
87 {
return d_filename; }
109 {
return d_function; }
112 const char* what()
const throw();
126 static void setStdErrEnabled(
bool enabled);
135 static bool isStdErrEnabled();
166 const String& name =
"CEGUI::Exception",
167 const String& filename =
"",
169 const String&
function =
"");
217 const String& file =
"unknown",
int line = 0,
218 const String&
function =
"unknown") :
219 Exception(message,
"CEGUI::GenericException", file, line, function)
240 #define GenericException(message) \ 241 GenericException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME) 275 const String& file =
"unknown",
int line = 0,
276 const String&
function =
"unknown") :
277 Exception(message,
"CEGUI::UnknownObjectException", file, line, function)
298 #define UnknownObjectException(message) \ 299 UnknownObjectException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME) 333 const String& file =
"unknown",
int line = 0,
334 const String&
function =
"unknown") :
335 Exception(message,
"CEGUI::InvalidRequestException", file, line, function)
356 #define InvalidRequestException(message) \ 357 InvalidRequestException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME) 391 const String& file =
"unknown",
int line = 0,
392 const String&
function =
"unknown") :
393 Exception(message,
"CEGUI::FileIOException", file, line, function)
414 #define FileIOException(message) \ 415 FileIOException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME) 449 const String& file =
"unknown",
int line = 0,
450 const String&
function =
"unknown") :
451 Exception(message,
"CEGUI::RendererException", file, line, function)
472 #define RendererException(message) \ 473 ::CEGUI::RendererException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME) 512 const String& file =
"unknown",
int line = 0,
513 const String&
function =
"unknown") :
514 Exception(message,
"CEGUI::AlreadyExistsException", file, line, function)
535 #define AlreadyExistsException(message) \ 536 AlreadyExistsException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME) 570 const String& file =
"unknown",
int line = 0,
571 const String&
function =
"unknown") :
572 Exception(message,
"CEGUI::MemoryException", file, line, function)
593 #define MemoryException(message) \ 594 MemoryException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME) 628 const String& file =
"unknown",
int line = 0,
629 const String&
function =
"unknown") :
630 Exception(message,
"CEGUI::NullObjectException", file, line, function)
651 #define NullObjectException(message) \ 652 NullObjectException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME) 690 const String& file =
"unknown",
int line = 0,
691 const String&
function =
"unknown") :
692 Exception(message,
"CEGUI::ObjectInUseException", file, line, function)
713 #define ObjectInUseException(message) \ 714 ObjectInUseException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME) 748 const String& file =
"unknown",
int line = 0,
749 const String&
function =
"unknown") :
750 Exception(message,
"CEGUI::ScriptException", file, line, function)
771 #define ScriptException(message) \ 772 ScriptException(message, __FILE__, __LINE__, CEGUI_FUNCTION_NAME) 779 #if defined(_MSC_VER) 780 # pragma warning(pop) 783 #endif // end of guard _CEGUIExceptions_h_ int d_line
Holds the line number where the exception occurred.
Definition: Exceptions.h:178
Exception class used when a request was made for an unknown object.
Definition: Exceptions.h:246
Exception class used when none of the other classes are applicable.
Definition: Exceptions.h:188
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:108
String d_filename
Holds the name of the file where the exception occurred.
Definition: Exceptions.h:176
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:689
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Exception class used when an attempt is made create a named object of a particular type when an objec...
Definition: Exceptions.h:483
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:747
Exception class used when a file handling problem occurs.
Definition: Exceptions.h:362
String d_function
Holds the name of the function where the exception occurred.
Definition: Exceptions.h:180
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:627
int getLine(void) const
Return the line number where the exception occurred.
Definition: Exceptions.h:96
Exception class used for problems in the rendering subsystem classes.
Definition: Exceptions.h:420
Exception class used when some required object or parameter is null.
Definition: Exceptions.h:599
String d_name
Holds the class name of the exception (e.g. CEGUI::ObjectInUseException)
Definition: Exceptions.h:174
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:448
String d_what
Holds the default error message.
Definition: Exceptions.h:182
String d_message
Holds the reason for the exception being thrown.
Definition: Exceptions.h:172
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:569
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:332
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:274
Root exception class used within the GUI system.
Definition: Exceptions.h:46
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:216
static bool d_stdErrEnabled
if this is true, newly constructed exceptions will output to stderr
Definition: Exceptions.h:139
Exception class used when some attempt to delete, remove, or otherwise invalidate some object that is...
Definition: Exceptions.h:661
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:86
Exception class used when a memory handling error is detected.
Definition: Exceptions.h:541
const String & getName() const
Return a reference to the String object containing the exception name (i.e. class type)...
Definition: Exceptions.h:74
Exception class used when some impossible request was made of the system.
Definition: Exceptions.h:304
const String & getMessage(void) const
Return a reference to the String object describing the reason for the exception being thrown...
Definition: Exceptions.h:63
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:390
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:511
String class used within the GUI system.
Definition: String.h:62
Exception class used for issues in scripting subsystem.
Definition: Exceptions.h:719