]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/loader.cpp
Add missing virtual destructor to Collection::ItemKeywordBase
[libs/datafile.git] / source / loader.cpp
index 0a9f68f249a8d56fe76ab5ba36f5c5bfe76a57e8..284588afde9fba1462d4808d9891f49569b9c650 100644 (file)
@@ -16,6 +16,7 @@ void Loader::load(const Statement &st)
 {
        for(list<Statement>::const_iterator i=st.sub.begin(); i!=st.sub.end(); ++i)
                load_statement(*i);
+       finish();
 }
 
 void Loader::load(Parser &p)
@@ -26,6 +27,7 @@ void Loader::load(Parser &p)
                if(st.valid)
                        load_statement(st);
        }
+       finish();
 }
 
 Loader::~Loader()
@@ -51,7 +53,7 @@ void Loader::load_statement(const Statement &st)
        cur_st=&st;
        ActionMap::iterator j=actions.find(st.keyword);
        if(j==actions.end())
-               throw KeyError(st.get_location()+": Unknown keyword '"+st.keyword+"'");
+               throw KeyError(st.get_location()+": Unknown keyword", st.keyword);
        if(j->second)
                j->second->execute(*this, st);
        cur_st=0;