e2d::core::Exception Class Reference

Inherits std::exception.

List of all members.

Detailed Description

If any error occurs in any point of the Easy2D classes, an Exception will be thrown. If you don't catch it, Easy2D will, and subsequently quit all subsystems, perform cleanups (including a call to your OnQuit implementation), and write the error message to the standard error output (in the case of SDL, it will be a file called stderr.txt, created on the same directory of your executable file). All this done, the program terminates and closes.

Public Member Functions

 Exception (char *error_message,...)
 Exception (Exception const &other_exception)
 Copy constructor.
virtual void raise ()
 Raises this exception.
const char * what ()
 Gets the error message.

Constructor & Destructor Documentation

e2d::core::Exception::Exception ( char *  error_message,

This constructor is the only way to set an error message to an exception. If you want to throw an exception, you may create an object of this class using this constructor (recommended), or using the default constructor, but then there will be no error message and you may end up confused. The error message can be set the same way you would use printf (with varargs). Take care because the message is only 1024 bytes wide.

error_message The error message.

e2d::core::Exception::Exception ( Exception const &  other_exception  ) 

Required to all classes that are thrown

other_exception The exception to copy from.

Member Function Documentation

void e2d::core::Exception::raise (  )  [virtual]

Convenience method whose purpose is to throw this object.

const char * e2d::core::Exception::what (  ) 

the error message passed to the constructor

Generated on Tue Dec 8 10:32:44 2009 for Easy2D by  doxygen 1.5.6