]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/loader.cpp
Move all exception classes to except.h, for real this time
[libs/datafile.git] / source / loader.cpp
index d987a9e92fd646ce8812f9b827028d508d0601f5..81fd27eecebf87c16e3418ae6d11e3ead9ba8d80 100644 (file)
@@ -1,6 +1,6 @@
 #include <msp/core/raii.h>
 #include <msp/strings/format.h>
-#include "dataerror.h"
+#include "except.h"
 #include "loader.h"
 #include "type.h"
 
@@ -24,7 +24,7 @@ bool signature_match(const string &st_sig, const string &act_sig)
        else if(act_sig.size()==2 && act_sig[1]=='*')
        {
                for(string::const_iterator i=st_sig.begin(); i!=st_sig.end(); ++i)
-                       if(*i!=act_sig[0])
+                       if(!signature_match(*i, act_sig[0]))
                                return false;
 
                return true;
@@ -47,28 +47,6 @@ bool signature_match(const string &st_sig, const string &act_sig)
 namespace Msp {
 namespace DataFile {
 
-class unknown_keyword: public runtime_error
-{
-public:
-       unknown_keyword(const std::string &k):
-               runtime_error(k)
-       { }
-
-       virtual ~unknown_keyword() throw() { }
-};
-
-
-class invalid_signature: public runtime_error
-{
-public:
-       invalid_signature(const std::string &k, const std::string &s):
-               runtime_error(format("%s %s", k, s))
-       { }
-
-       virtual ~invalid_signature() throw() { }
-};
-
-
 Loader::Loader():
        cur_st(0),
        direct(false),