
15 Jun
2011
15 Jun
'11
8:02 p.m.
On Jun 14, 2:45 pm, Michael Schuerig <michael.li...@schuerig.de> wrote:
void foo(const string& file_name) { try { do_something_fallible(file_name); } catch( boost::exception & e ) { e << boost::errinfo_file_name(file_name); throw; }
}
I'd rather write it like this:
void foo(const string& file_name) { diagnostic<errinfo_file_name>(file_name); do_something_fallible(file_name);
}
sorry if I don't get the question right. can't you just do this?
} catch( boost::exception & e ) { throw (e << boost::errinfo_file_name(file_name) ); }