diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-04-12 17:06:58 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-04-12 17:06:58 +0000 |
commit | 8a4f9e902cf64f97ee2f15fa3940a7cf183a27b7 (patch) | |
tree | 079aaf36f288a420a1bd1e7dd1477ac445837031 /libdimensionxx/error.cpp | |
parent | 6cfdbf44cce0b0881d1811e7ec06c4e79e637c96 (diff) | |
download | dimension-8a4f9e902cf64f97ee2f15fa3940a7cf183a27b7.tar.xz |
Use exceptions to report errors when possible.
Diffstat (limited to 'libdimensionxx/error.cpp')
-rw-r--r-- | libdimensionxx/error.cpp | 5 |
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) { } } |