diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-04-12 19:06:50 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-04-12 19:06:50 +0000 |
commit | b9e19e076662ae5743b9c81eb238fe11204f6dbd (patch) | |
tree | 2a29279adf20a2b8291f56f341695db07e861e98 /libdimensionxx/dimensionxx/error.hpp | |
parent | 8a4f9e902cf64f97ee2f15fa3940a7cf183a27b7 (diff) | |
download | dimension-b9e19e076662ae5743b9c81eb238fe11204f6dbd.tar.xz |
Add some comments.
Diffstat (limited to 'libdimensionxx/dimensionxx/error.hpp')
-rw-r--r-- | libdimensionxx/dimensionxx/error.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libdimensionxx/dimensionxx/error.hpp b/libdimensionxx/dimensionxx/error.hpp index 8919895..99670cb 100644 --- a/libdimensionxx/dimensionxx/error.hpp +++ b/libdimensionxx/dimensionxx/error.hpp @@ -21,21 +21,29 @@ #ifndef DIMENSIONXX_ERROR_HPP #define DIMENSIONXX_ERROR_HPP +// Wrappers for libdimension error handling, and an exception class. +// dmnsn_error is still used by libdimensionxx whenever an exception shouldn't +// be thrown, like in destructors, and whenever libdimension or libdimension-* +// use it internally. Exceptions are thrown otherwise to report errors. + #include <dimension.h> #include <stdexcept> #include <string> namespace Dimension { + // Wrapper for dmnsn_severity enum Severity { SEVERITY_LOW = DMNSN_SEVERITY_LOW, SEVERITY_MEDIUM = DMNSN_SEVERITY_MEDIUM, SEVERITY_HIGH = DMNSN_SEVERITY_HIGH }; + // Get or set the resilience, thread-safely Severity resilience(); void resilience(Severity resilience); + // Generic exception class, derives from std::runtime_error class Dimension_Error : public std::runtime_error { public: |