ROSE 0.11.145.192
Sawyer/Exception.h
1// WARNING: Changes to this file must be contributed back to Sawyer or else they will
2// be clobbered by the next update from Sawyer. The Sawyer repository is at
3// https://gitlab.com/charger7534/sawyer.git.
4
5
6
7
8#ifndef Sawyer_Exception_H
9#define Sawyer_Exception_H
10
11#include <Sawyer/Sawyer.h>
12
13namespace Sawyer {
14namespace Exception {
15
17class SAWYER_EXPORT RuntimeError: public std::runtime_error {
18public:
19 ~RuntimeError() throw() {}
20
22 explicit RuntimeError(const std::string &mesg)
23 : std::runtime_error(mesg) {}
24};
25
27class SAWYER_EXPORT DomainError: public RuntimeError {
28public:
29 ~DomainError() throw() {}
30
32 explicit DomainError(const std::string &mesg)
33 : RuntimeError(mesg) {}
34};
35
39class SAWYER_EXPORT NotFound: public DomainError {
40public:
41 ~NotFound() throw () {}
42
44 explicit NotFound(const std::string &mesg)
45 : DomainError(mesg) {}
46};
47
51class SAWYER_EXPORT AlreadyExists: public DomainError {
52public:
53 ~AlreadyExists() throw () {}
54
56 AlreadyExists(const std::string &mesg)
57 : DomainError(mesg) {}
58};
59
64class SAWYER_EXPORT ContainsCycle: public DomainError {
65public:
66 ~ContainsCycle() throw () {}
67
69 ContainsCycle(const std::string &mesg)
70 : DomainError(mesg) {}
71};
72
76class SAWYER_EXPORT FilesystemError: public RuntimeError {
77public:
78 ~FilesystemError() throw () {}
79
81 FilesystemError(const std::string &mesg)
82 : RuntimeError(mesg) {}
83};
84
86class SAWYER_EXPORT SyntaxError: public RuntimeError {
87public:
88 ~SyntaxError() throw () {
89 }
90
92 SyntaxError(const std::string &mesg)
93 : RuntimeError(mesg) {}
94};
95
96
97} // namespace
98} // namespace
99
100#endif
Error for existing values.
AlreadyExists(const std::string &mesg)
Constructor taking a description of the error.
Error when a cycle is detected.
ContainsCycle(const std::string &mesg)
Constructor taking a description of the error.
Base class for Sawyer domain errors.
DomainError(const std::string &mesg)
Constructor taking a description of the error.
Error related to the file system.
FilesystemError(const std::string &mesg)
Constructor taking a description of the error.
Error for non-existing values.
NotFound(const std::string &mesg)
Constructor taking a description of the error.
Base class for Sawyer runtime errors.
RuntimeError(const std::string &mesg)
Constructor taking a description of the error.
Error in parsing something.
SyntaxError(const std::string &mesg)
Constructor taking a description of the error.
Sawyer support library.