X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fexcept.cpp;h=c698d83c697878945121ea666b06526998f5bd4c;hb=6b702cdd97e3788d3bf07a6c3b6004c653e1eaa7;hp=d3929f6c7a8592fb6cf26fef9956c9e916f7965d;hpb=193d36c8ce13cf2c5cd055fbd008f3003dda0a3e;p=libs%2Fdatafile.git 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)