summaryrefslogtreecommitdiff
path: root/src/exceptions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/exceptions.h')
-rw-r--r--src/exceptions.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/exceptions.h b/src/exceptions.h
index bc5e83d1..7446e352 100644
--- a/src/exceptions.h
+++ b/src/exceptions.h
@@ -146,7 +146,25 @@ public:
private:
std::string _message;
};
-
+
+/** @class TimeFormatError
+ * @brief A an error with a string passed to LocalTime.
+ */
+class TimeFormatError : public std::exception
+{
+public:
+ TimeFormatError (std::string bad_time);
+ ~TimeFormatError () throw () {}
+
+ /** @return error message */
+ char const * what () const throw () {
+ return _message.c_str ();
+ }
+
+private:
+ std::string _message;
+};
+
}
#endif