diff options
author | John Wiegley <johnw@newartisans.com> | 2006-03-08 18:24:56 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:29 -0400 |
commit | e32d9e64a768f276e04fe79c14f1b28d88bd4185 (patch) | |
tree | 198f0b5a65a2eeb6f1f0a61dc59bf5111e7ae50d /amount.h | |
parent | b737cd8e6dd185beeae902caa4eee6c4cee8bc36 (diff) | |
download | fork-ledger-e32d9e64a768f276e04fe79c14f1b28d88bd4185.tar.gz fork-ledger-e32d9e64a768f276e04fe79c14f1b28d88bd4185.tar.bz2 fork-ledger-e32d9e64a768f276e04fe79c14f1b28d88bd4185.zip |
Added much better error location.
Diffstat (limited to 'amount.h')
-rw-r--r-- | amount.h | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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 |