summaryrefslogtreecommitdiffstats
path: root/libdimensionxx/dimensionxx/error.hpp
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-04-12 19:06:50 +0000
committerTavian Barnes <tavianator@gmail.com>2009-04-12 19:06:50 +0000
commitb9e19e076662ae5743b9c81eb238fe11204f6dbd (patch)
tree2a29279adf20a2b8291f56f341695db07e861e98 /libdimensionxx/dimensionxx/error.hpp
parent8a4f9e902cf64f97ee2f15fa3940a7cf183a27b7 (diff)
downloaddimension-b9e19e076662ae5743b9c81eb238fe11204f6dbd.tar.xz
Add some comments.
Diffstat (limited to 'libdimensionxx/dimensionxx/error.hpp')
-rw-r--r--libdimensionxx/dimensionxx/error.hpp8
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: