summaryrefslogtreecommitdiffstats
path: root/libdimensionxx/error.cpp
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/error.cpp
parent6cfdbf44cce0b0881d1811e7ec06c4e79e637c96 (diff)
downloaddimension-8a4f9e902cf64f97ee2f15fa3940a7cf183a27b7.tar.xz
Use exceptions to report errors when possible.
Diffstat (limited to 'libdimensionxx/error.cpp')
-rw-r--r--libdimensionxx/error.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libdimensionxx/error.cpp b/libdimensionxx/error.cpp
index fce453e..948a8c0 100644
--- a/libdimensionxx/error.cpp
+++ b/libdimensionxx/error.cpp
@@ -19,6 +19,8 @@
*************************************************************************/
#include "dimensionxx.hpp"
+#include <stdexcept>
+#include <string>
namespace Dimension
{
@@ -33,4 +35,7 @@ namespace Dimension
{
dmnsn_set_resilience(static_cast<dmnsn_severity>(resilience));
}
+
+ Dimension_Error::Dimension_Error(const std::string& str)
+ : std::runtime_error(str) { }
}