summaryrefslogtreecommitdiffstats
path: root/libdimensionxx/dimensionxx
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-04-12 17:06:58 +0000
committerTavian Barnes <tavianator@gmail.com>2009-04-12 17:06:58 +0000
commit8a4f9e902cf64f97ee2f15fa3940a7cf183a27b7 (patch)
tree079aaf36f288a420a1bd1e7dd1477ac445837031 /libdimensionxx/dimensionxx
parent6cfdbf44cce0b0881d1811e7ec06c4e79e637c96 (diff)
downloaddimension-8a4f9e902cf64f97ee2f15fa3940a7cf183a27b7.tar.xz
Use exceptions to report errors when possible.
Diffstat (limited to 'libdimensionxx/dimensionxx')
-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 072949f..8919895 100644
--- a/libdimensionxx/dimensionxx/error.hpp
+++ b/libdimensionxx/dimensionxx/error.hpp
@@ -22,6 +22,8 @@
#define DIMENSIONXX_ERROR_HPP
#include <dimension.h>
+#include <stdexcept>
+#include <string>
namespace Dimension
{
@@ -33,6 +35,12 @@ namespace Dimension
Severity resilience();
void resilience(Severity resilience);
+
+ class Dimension_Error : public std::runtime_error
+ {
+ public:
+ Dimension_Error(const std::string& str);
+ };
}
#endif /* DIMENSIONXX_ERROR_HPP */