summaryrefslogtreecommitdiff
path: root/src/error.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-10 08:16:26 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-10 08:16:26 -0400
commit7be17fd779db1ee2a20064bdf3b4a8f5da3eb968 (patch)
tree4408ceac022ed5370f2eb4b57408bbc7050697c4 /src/error.h
parent5aa1f8b6249a4d6d933b9ce1b2c79011439a04c6 (diff)
downloadfork-ledger-7be17fd779db1ee2a20064bdf3b4a8f5da3eb968.tar.gz
fork-ledger-7be17fd779db1ee2a20064bdf3b4a8f5da3eb968.tar.bz2
fork-ledger-7be17fd779db1ee2a20064bdf3b4a8f5da3eb968.zip
Corrections to the way error strings are generated
Diffstat (limited to 'src/error.h')
-rw-r--r--src/error.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/error.h b/src/error.h
index 0d33f020..b8b011eb 100644
--- a/src/error.h
+++ b/src/error.h
@@ -51,6 +51,7 @@ extern std::ostringstream _desc_buffer;
template <typename T>
inline void throw_func(const string& message) {
+ _desc_buffer.clear();
_desc_buffer.str("");
throw T(message);
}
@@ -62,6 +63,7 @@ inline void throw_func(const string& message) {
inline void warning_func(const string& message) {
std::cerr << "Warning: " << message << std::endl;
+ _desc_buffer.clear();
_desc_buffer.str("");
}