X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Fexcept.cpp;h=c698d83c697878945121ea666b06526998f5bd4c;hp=d3929f6c7a8592fb6cf26fef9956c9e916f7965d;hb=ef12cc79fddd527e895169f62d7424b18d5937ca;hpb=14f031aead619ce8a3fff1c283c3d205d421cd1f diff --git a/source/except.cpp b/source/except.cpp index d3929f6..c698d83 100644 --- a/source/except.cpp +++ b/source/except.cpp @@ -19,6 +19,12 @@ data_error::data_error(const string &s, unsigned l, const exception &e): line(l) { } +data_error::data_error(const string &s, unsigned l, const data_error &e): + runtime_error(format("%s\n%s", e.what(), make_what(s, l, "Referenced here"))), + source(s), + line(l) +{ } + string data_error::make_what(const string &s, unsigned l, const string &w) { if(l)