diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-05-31 17:20:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-31 17:20:37 -0400 |
| commit | 6cbc3929a54d37bd23cb5efa8e3320ba02f78b2f (patch) | |
| tree | 5a23cb47782e9e2a77762c90dd35da1005eba8d0 /source/core/slang-exception.h | |
| parent | b81ff3ef968d1cc4e954b31a1812b3c391d17b02 (diff) | |
Use slang- prefix on slang compiler and core source (#973)
* Prefixing source files in source/slang with slang-
* Prefix source in source/slang with slang- prefix.
* Rename core source files with slang- prefix.
* Update project files.
* Fix problems from automatic merge.
Diffstat (limited to 'source/core/slang-exception.h')
| -rw-r--r-- | source/core/slang-exception.h | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/source/core/slang-exception.h b/source/core/slang-exception.h new file mode 100644 index 000000000..91139e298 --- /dev/null +++ b/source/core/slang-exception.h @@ -0,0 +1,137 @@ +#ifndef SLANG_CORE_EXCEPTION_H +#define SLANG_CORE_EXCEPTION_H + +#include "slang-common.h" +#include "slang-string.h" + +namespace Slang +{ + class Exception + { + public: + String Message; + Exception() + {} + Exception(const String & message) + : Message(message) + { + } + + virtual ~Exception() + {} + }; + + 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) + { + } + }; + + class InternalError : public Exception + { + public: + InternalError() + {} + InternalError(const String & message) + : Exception(message) + { + } + }; + + class AbortCompilationException : public Exception + { + public: + AbortCompilationException() + {} + AbortCompilationException(const String & message) + : Exception(message) + { + } + }; +} + +#endif |
