diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-06-15 13:24:25 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-06-15 13:24:25 -0700 |
| commit | 205187b561c3b31fa931e73e8f7263f0c4b1de41 (patch) | |
| tree | 7bd2cd5ae3c14416b71ef8319ff02ace429d1132 /source/core/exception.h | |
| parent | 517513645afb8eaf4841e7b7035f1ba3a9c7cd57 (diff) | |
Rename `CoreLib::*` to `Slang`
Getting rid of more namespace complexity and stripping things down to the basics.
This also gets rid of some dead code in the "core" library.
Diffstat (limited to 'source/core/exception.h')
| -rw-r--r-- | source/core/exception.h | 167 |
1 files changed, 82 insertions, 85 deletions
diff --git a/source/core/exception.h b/source/core/exception.h index 652cafca7..4671ae10b 100644 --- a/source/core/exception.h +++ b/source/core/exception.h @@ -4,112 +4,109 @@ #include "common.h" #include "slang-string.h" -namespace CoreLib +namespace Slang { - namespace Basic + class Exception : public Object { - class Exception : public Object + public: + String Message; + Exception() + {} + Exception(const String & message) + : Message(message) { - public: - String Message; - Exception() - {} - Exception(const String & message) - : Message(message) - { - } - }; + } + }; - class IndexOutofRangeException : public Exception + class IndexOutofRangeException : public Exception + { + public: + IndexOutofRangeException() + {} + IndexOutofRangeException(const String & message) + : Exception(message) { - public: - IndexOutofRangeException() - {} - IndexOutofRangeException(const String & message) - : Exception(message) - { - } + } - }; + }; - class InvalidOperationException : public Exception + class InvalidOperationException : public Exception + { + public: + InvalidOperationException() + {} + InvalidOperationException(const String & message) + : Exception(message) { - public: - InvalidOperationException() - {} - InvalidOperationException(const String & message) - : Exception(message) - { - } + } - }; + }; - class ArgumentException : public Exception + class ArgumentException : public Exception + { + public: + ArgumentException() + {} + ArgumentException(const String & message) + : Exception(message) { - public: - ArgumentException() - {} - ArgumentException(const String & message) - : Exception(message) - { - } + } - }; + }; - class KeyNotFoundException : public Exception + class KeyNotFoundException : public Exception + { + public: + KeyNotFoundException() + {} + KeyNotFoundException(const String & message) + : Exception(message) { - public: - KeyNotFoundException() - {} - KeyNotFoundException(const String & message) - : Exception(message) - { - } - }; - class KeyExistsException : public Exception + } + }; + class KeyExistsException : public Exception + { + public: + KeyExistsException() + {} + KeyExistsException(const String & message) + : Exception(message) { - public: - KeyExistsException() - {} - KeyExistsException(const String & message) - : Exception(message) - { - } - }; + } + }; - class NotSupportedException : public Exception + class NotSupportedException : public Exception + { + public: + NotSupportedException() + {} + NotSupportedException(const String & message) + : Exception(message) { - public: - NotSupportedException() - {} - NotSupportedException(const String & message) - : Exception(message) - { - } - }; + } + }; - class NotImplementedException : public Exception + class NotImplementedException : public Exception + { + public: + NotImplementedException() + {} + NotImplementedException(const String & message) + : Exception(message) { - public: - NotImplementedException() - {} - NotImplementedException(const String & message) - : Exception(message) - { - } - }; + } + }; - class InvalidProgramException : public Exception + class InvalidProgramException : public Exception + { + public: + InvalidProgramException() + {} + InvalidProgramException(const String & message) + : Exception(message) { - public: - InvalidProgramException() - {} - InvalidProgramException(const String & message) - : Exception(message) - { - } - }; - } + } + }; } #endif
\ No newline at end of file |
