summaryrefslogtreecommitdiffstats
path: root/source/core/exception.h
diff options
context:
space:
mode:
authorTim Foley <tim.foley.is@gmail.com>2017-07-19 18:52:38 -0700
committerGitHub <noreply@github.com>2017-07-19 18:52:38 -0700
commitf07c01ceb012b9b325a8ecebd12cdd5797d8d5b3 (patch)
tree0b93a109d51e6565560ad785519a863386490e2a /source/core/exception.h
parenta2b8b4c20632d79721052abd232fe2d1bdf2700d (diff)
parent3f48e1c0d84bf4909954154ad147559656e87516 (diff)
Merge pull request #128 from tfoleyNV/improve-failure-modes
Try to improve handling of failures during compilation
Diffstat (limited to 'source/core/exception.h')
-rw-r--r--source/core/exception.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/core/exception.h b/source/core/exception.h
index dc674de7f..aedb62add 100644
--- a/source/core/exception.h
+++ b/source/core/exception.h
@@ -111,12 +111,16 @@ namespace Slang
}
};
- #define SLANG_UNEXPECTED(reason) \
- throw Slang::Exception("unexpected: " reason)
-
- #define SLANG_UNIMPLEMENTED_X(what) \
- throw Slang::NotImplementedException("unimplemented: " what)
-
+ class InternalError : public Exception
+ {
+ public:
+ InternalError()
+ {}
+ InternalError(const String & message)
+ : Exception(message)
+ {
+ }
+ };
}
#endif \ No newline at end of file