#pragma once

//#include <cstring>
#include <stdio.h>
#include <string.h>
using namespace std;


#define MPT_EXCEPTION(info)	exception->setError((const char*)info, (const char*)__FILE__, __LINE__); return
#define MPT_EXCEPTION_TEST if(exception->exception == true) return

#ifndef MPT_SUCCESS
#define MPT_SUCCESS		0
#define MPT_ERROR 		1
#define MPT_NOSUCCESS	2
#endif


namespace MobilePhotoTool{

	class MPT_Exception
	{
	private:
		char *description;
		char *file;
		char *line;
		char *error;
		static const int maxStringlength = 500;

	public:
		bool exception;

		MPT_Exception();
		~MPT_Exception(void);
		void setError(const char *description,const char *file, int line);

		char *toString();
	};

}
