Initial Commit

This commit is contained in:
2024-08-07 09:09:36 -04:00
commit ca445435a0
458 changed files with 41370 additions and 0 deletions

50
common/EXCEPT.HPP Normal file
View File

@@ -0,0 +1,50 @@
#ifndef _COMMON_EXCEPTION_HPP_
#define _COMMON_EXCEPTION_HPP_
#ifndef _COMMON_STRING_HPP_
#include <common/string.hpp>
#endif
class Exception
{
public:
Exception(){mReason="";}
Exception(const String &reason){mReason=reason;}
virtual ~Exception(){;}
virtual String toString(){return mReason;}
const String &getReason(void)const{return mReason;};
private:
String mReason;
};
class BoundaryError : public Exception
{
public :
String toString(){return "BoundaryError";}
};
class NullError : public Exception
{
public :
String toString(){return "NullError";}
};
class ArrayIndexOutOfBoundsException : public Exception
{
public :
String toString(){return "ArrayIndexOutOfBounds";}
};
class LibraryNotFoundException : public Exception
{
public:
LibraryNotFoundException(const String &reason="LibraryNotFoundException"):Exception(reason){;}
String toString(){return getReason();}
};
class InvalidStateException : public Exception
{
public:
InvalidStateException(const String &reason="InvalidStateException"):Exception(reason){;}
String toString(){return getReason();}
};
#endif