diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2011-09-09 18:40:59 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2011-09-09 18:40:59 +0000 |
| commit | 3caf96211085254ab3c42a59ce2c80a4ade3d2d8 (patch) | |
| tree | c795d6e6b39f8f9bbf4422ede5d1bc20fd277f4b /src/exception.hh | |
| parent | 0676eaec5cc56bf14b7791f5a2ef5485a7a43370 (diff) | |
exception: refactoring
Diffstat (limited to 'src/exception.hh')
| -rw-r--r-- | src/exception.hh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/exception.hh b/src/exception.hh new file mode 100644 index 00000000..f341e724 --- /dev/null +++ b/src/exception.hh @@ -0,0 +1,32 @@ +#ifndef exception_hh_INCLUDED +#define exception_hh_INCLUDED + +#include <string> + +namespace Kakoune +{ + +struct exception +{ + virtual ~exception() {} + virtual std::string description() const; +}; + +struct runtime_error : exception +{ + runtime_error(const std::string description) + : m_description(description) {} + + std::string description() const { return m_description; } + +private: + std::string m_description; +}; + +struct logic_error : exception +{ +}; + +} + +#endif // exception_hh_INCLUDED |
