summaryrefslogtreecommitdiff
path: root/amount.h
diff options
context:
space:
mode:
Diffstat (limited to 'amount.h')
-rw-r--r--amount.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/amount.h b/amount.h
index 360da8f9..5598043b 100644
--- a/amount.h
+++ b/amount.h
@@ -12,6 +12,7 @@
#include <exception>
#include "debug.h"
+#include "error.h"
namespace ledger {
@@ -624,15 +625,10 @@ inline std::time_t amount_t::date() const {
}
}
-class amount_error : public std::exception {
- std::string reason;
+class amount_error : public error {
public:
- amount_error(const std::string& _reason) throw() : reason(_reason) {}
+ amount_error(const std::string& reason) throw() : error(reason) {}
virtual ~amount_error() throw() {}
-
- virtual const char* what() const throw() {
- return reason.c_str();
- }
};
} // namespace ledger