#ifndef _EXCEPTION_IO_H_
#define _EXCEPTION_IO_H_

#include <string>
#include <fstream>
#include <tcl.h>

#include "exceptionbase.h"

using namespace std;

/**
 * \brief Base IO Exception
 *
 * Handle situation, if opening file failed.
 *
 * \date 01-21-2006
 *
 * \author Ondrej Svejdar
 *
 * \todo 
 *
 * \bug 
 *
 */
class ExceptionIO:public ExceptionBase
{
	const string fileName;
	bool readOnly;
public:
	static const char* type;
	const char* getType() const;

	/**
	 * \brief ctor
	 * \param fileName name of file
	 * \param readOnly true if opening for read only false otherwise
	 */
	ExceptionIO(const string& fileName,bool readOnly):
	fileName(fileName),readOnly(readOnly)
	{
	}

	~ExceptionIO() throw()
	{
	}

	const string& getMessage() const;
};


#endif/*_EXCEPTION_IO_H_*/
