]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/fmt.h
Improve exceptions for Regex and RegMatch
[libs/core.git] / source / strings / fmt.h
index ba75958802b7760b6f6b352827e4f313048e717f..84690d174388ce288eb78243d9973b1f2662d1e0 100644 (file)
@@ -1,18 +1,20 @@
-/* $Id$
-
-This file is part of libmspstrings
-Copyright © 2006-2008 Mikko Rasa
-Distributed under the LGPL
-*/
-
 #ifndef MSP_STRINGS_FMT_H_
 #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