]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/fmt.h
Exception changes for Fmt and Formatter
[libs/core.git] / source / strings / fmt.h
index ba75958802b7760b6f6b352827e4f313048e717f..8633324b5c0d323d272a194d5e9c68716093b671 100644 (file)
@@ -9,10 +9,19 @@ Distributed under the LGPL
 #define MSP_STRINGS_FMT_H_
 
 #include <ostream>
+#include <stdexcept>
 #include <string>
 
 namespace Msp {
 
+class format_error: public std::logic_error
+{
+public:
+       format_error(const std::string &w): std::logic_error(w) { }
+       virtual ~format_error() throw() { }
+};
+
+
 /**
 Stores formatting information for converting variables into strings.  Can be
 applied to an std::ostream or fed to lexical_cast.  Also used internally by