X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Floader.cpp;h=ad62445f0be3e00a785695121e510f76cc7d4a5f;hp=2bf90ee1e5ec9436e9306a09a7917c8e25e32cdc;hb=b0b9af7216560da2a46ea38fe2df959f4dfb126f;hpb=f51adf2b95f32bdda4d90eb52431405c3ecf8db1 diff --git a/source/loader.cpp b/source/loader.cpp index 2bf90ee..ad62445 100644 --- a/source/loader.cpp +++ b/source/loader.cpp @@ -176,6 +176,13 @@ const string &Loader::get_source() const return cur_st->source; } +void Loader::error(const string &msg) const +{ + if(!cur_st) + throw logic_error("!cur_st"); + throw data_error(cur_st->source, cur_st->line, msg); +} + Loader::ActionKey::ActionKey(const string &k, const string &s): keyword(k),