summaryrefslogtreecommitdiff
path: root/src/error.h
diff options
context:
space:
mode:
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("");
}