]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/except.h
Use <cstdint> in BinFloat
[libs/datafile.git] / source / except.h
index e68ec481f4aa869ada66a660c59e06e195b6b34b..34d9e77810d838b694e0023a364271ecd1bb5afc 100644 (file)
@@ -2,6 +2,8 @@
 #define MSP_DATAFILE_EXCEPT_H_
 
 #include <stdexcept>
+#include <string>
+#include <typeinfo>
 
 namespace Msp {
 namespace DataFile {
@@ -15,6 +17,7 @@ private:
 public:
        data_error(const std::string &, unsigned, const std::string &);
        data_error(const std::string &, unsigned, const std::exception &);
+       data_error(const std::string &, unsigned, const data_error &);
        virtual ~data_error() throw() { }
 
        const std::string &get_source() const { return source; }
@@ -56,6 +59,29 @@ public:
        virtual ~nesting_error() throw() { }
 };
 
+
+class unknown_keyword: public std::runtime_error
+{
+public:
+       unknown_keyword(const std::string &);
+       virtual ~unknown_keyword() throw() { }
+};
+
+
+class invalid_signature: public std::runtime_error
+{
+public:
+       invalid_signature(const std::string &, const std::string &);
+       virtual ~invalid_signature() throw() { }
+};
+
+
+class no_collection: public std::runtime_error
+{
+public:
+       no_collection(const std::type_info &);
+};
+
 } // namespace DataFile
 } // namespace Msp