#ifndef _EXCEPTION_H_
#define _EXCEPTION_H_

#include "exceptionbase.h"

/**
 * \brief Common exception
 * 
 * \date 01-21-2006
 *
 * \author Ondrej Svejdar
 *
 * \todo 
 *
 * \bug 
 *
 */
class Exception:public ExceptionBase
{
	string message;
public:
	static const char* type;
	const char* getType() const;

	/**
	 * \brief ctor
	 * Common exceptions, message parameter is substituted as in printf function. \n
	 * Example : \n
	 * \code
	 * throw new Exception("HelloWorld","Error opening file %s errorcode %d","foo",1)
	 * \endcode
	 * The message in this example will be "Error opening file foo errorcode 1".
	 *
	 * \param className name of class in which was exception thrown
	 * \param message message to display, message is substituted as in printf function
	 */
	Exception(const char* className,const char* message,...);
	~Exception() throw()
	{
	}

	const string& getMessage() const
	{
		return message;
	}
};

#endif/*_EXCEPTION_H_*/
