scsl 1.0.1
Shimmering Clarity Standard Library
Loading...
Searching...
No Matches
Exceptions.h
Go to the documentation of this file.
1
22
23#ifndef SCSL_EXCEPTIONS_H
24#define SCSL_EXCEPTIONS_H
25
26
27#include <exception>
28#include <string>
29
30
31namespace sctest {
32
33
38class NotImplemented : public std::exception {
39public:
41 explicit NotImplemented(const char *pl) : platform((char *)pl) {}
42
44 const char *what() const throw() {
45 return this->platform;
46 }
47private:
48 char *platform;
49};
50
51
53class AssertionFailed : public std::exception {
54public:
57 explicit AssertionFailed(std::string message);
58
60 const char *what() const throw();
61
62private:
63 std::string msg;
64};
65
66
67} // namespace sctest
68
69
70#endif // SCSL_EXCEPTIONS_H
AssertionFailed indicates that some invariant didn't hold.
Definition Exceptions.h:53
AssertionFailed(std::string message)
const char * what() const
what returns a message describing the exception.
Exception reserved for unsupported platforms.
Definition Exceptions.h:38
const char * what() const
what returns a message naming the platform.
Definition Exceptions.h:44
NotImplemented(const char *pl)
NotImplemented exceptions are constructed with a platform name.
Definition Exceptions.h:41
Shimmering Clarity testing library.
Definition sctest.h:34