diff options
Diffstat (limited to 'source/core/exception.h')
| -rw-r--r-- | source/core/exception.h | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/source/core/exception.h b/source/core/exception.h new file mode 100644 index 000000000..652cafca7 --- /dev/null +++ b/source/core/exception.h @@ -0,0 +1,115 @@ +#ifndef CORE_LIB_EXCEPTION_H +#define CORE_LIB_EXCEPTION_H + +#include "common.h" +#include "slang-string.h" + +namespace CoreLib +{ + namespace Basic + { + class Exception : public Object + { + public: + String Message; + Exception() + {} + Exception(const String & message) + : Message(message) + { + } + }; + + class IndexOutofRangeException : public Exception + { + public: + IndexOutofRangeException() + {} + IndexOutofRangeException(const String & message) + : Exception(message) + { + } + + }; + + class InvalidOperationException : public Exception + { + public: + InvalidOperationException() + {} + InvalidOperationException(const String & message) + : Exception(message) + { + } + + }; + + class ArgumentException : public Exception + { + public: + ArgumentException() + {} + ArgumentException(const String & message) + : Exception(message) + { + } + + }; + + class KeyNotFoundException : public Exception + { + public: + KeyNotFoundException() + {} + KeyNotFoundException(const String & message) + : Exception(message) + { + } + }; + class KeyExistsException : public Exception + { + public: + KeyExistsException() + {} + KeyExistsException(const String & message) + : Exception(message) + { + } + }; + + class NotSupportedException : public Exception + { + public: + NotSupportedException() + {} + NotSupportedException(const String & message) + : Exception(message) + { + } + }; + + class NotImplementedException : public Exception + { + public: + NotImplementedException() + {} + NotImplementedException(const String & message) + : Exception(message) + { + } + }; + + class InvalidProgramException : public Exception + { + public: + InvalidProgramException() + {} + InvalidProgramException(const String & message) + : Exception(message) + { + } + }; + } +} + +#endif
\ No newline at end of file |
