#ifndef CLASS_LIBEXCEPTION
#define CLASS_LIBEXCEPTION
class LibException
	{
	public:
		enum Severity {INFO,FATAL};
		LibException();
		~LibException();
		Severity getSeverity();
	protected:
		Severity severity;
	};
//-----------------------------------------------------------------------
// 				class DB_AccessException
//-----------------------------------------------------------------------
class DB_AccessException : public LibException
	{
	public:
		DB_AccessException(); //Constructor
		~DB_AccessException();//Destructor
		//Error msg
		static void msg(const Text *source, const Text *database);
	};
//-----------------------------------------------------------------------
// 				class DB_FormatException
//-----------------------------------------------------------------------
class DB_FormatException : public LibException
	{
	public:
		DB_FormatException(); //Constructor
		~DB_FormatException();//Destructor
		//Error message
		static void 
			msg(const Text *source, const Text *dbName, const int lineNumber);
	};
//-----------------------------------------------------------------------
// 				class FieldException
//-----------------------------------------------------------------------
class FieldException : public LibException
	{
	public:
		FieldException(); //Constructor
		~FieldException();//Destructor
		//Error message
		static void msg(const Text *source, const char *field, const int value);
	};   
//-----------------------------------------------------------------------
// 				class IdException
//-----------------------------------------------------------------------
class IdException : public LibException
	{
	public:
		IdException(); //Constructor
		~IdException();//Destructor
	};   
   
//-----------------------------------------------------------------------
// 				class InvalidIdException
//-----------------------------------------------------------------------
class InvalidIdException : public IdException
	{
	public:
		InvalidIdException(); //Constructor
		~InvalidIdException();//Destructor
		//Error message
		static void msg(const Text *source, const char *field, const int value);
	};   
//-----------------------------------------------------------------------
// 				class DuplicateIdException
//-----------------------------------------------------------------------
class DuplicateIdException : public IdException
	{
	public:
		DuplicateIdException(); //Constructor
		~DuplicateIdException();//Destructor
		static void msg(const Text *source, const Identity::Id id);
	};   
//-----------------------------------------------------------------------
// 				class ItemNotCheckedOutException
//-----------------------------------------------------------------------
class ItemNotCheckedOutException : public IdException
	{
	public:
		ItemNotCheckedOutException(); //Constructor
		~ItemNotCheckedOutException();//Destructor
		static void msg(const char *title);
	};   
//-----------------------------------------------------------------------
// 				class ItemLostException
//-----------------------------------------------------------------------
class ItemLostException : public IdException
	{
	public:
		ItemLostException(); //Constructor
		~ItemLostException();//Destructor
		static void msg(const char *title);
	};   
//-----------------------------------------------------------------------
// 				class ItemNonExistentException
//-----------------------------------------------------------------------
class ItemNonExistentException : public IdException
	{
	public:
		ItemNonExistentException(); //Constructor
		~ItemNonExistentException();//Destructor
		static void msg(const char *title);
	};   
//-----------------------------------------------------------------------
// 				class ItemAlreadyCheckedOutException
//-----------------------------------------------------------------------
class ItemAlreadyCheckedOutException : public IdException
	{
	public:
		ItemAlreadyCheckedOutException(); //Constructor
		~ItemAlreadyCheckedOutException();//Destructor
		static void msg(const char *title);
	};   
#endif
