]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/loader.cpp
Make use of KeyError's key parameter
[libs/datafile.git] / source / loader.cpp
index 0a9f68f249a8d56fe76ab5ba36f5c5bfe76a57e8..67668cdea1f5bc52b76c7c02c401fda501d9531e 100644 (file)
@@ -51,7 +51,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;