
Emil Dotchevski wrote:
I've also received feedback that boost::exception_info would be used fairly often and needs a shorter name. Maybe boost::xinfo? I hope someone comes up with a better name.
boost::exception_info is just perfect. write once - read many. long and descriptive name is much better from a long-time perspective. one idea to slightly reduce syntactic overhead: provide a way to replace: throw fopen_error() << boost::exception_info<tag_errno>(errno) << boost::exception_info<tag_file_name>(name) << boost::exception_info<tag_open_mode>(mode) << boost::exception_info<tag_function>("fopen"); with throw fopen_error() << boost::exception_info<tag_errno, tag_file_name, tag_open_mode, tag_function>(errno, name, mode, "fopen"); but it has a drawback that one can easily permutate variables and compiler would not catch it in some cases. something like throw fopen_error() << boost::exception_info(tag_errno(), errno) (tag_file_name(), name) (tag_open_mode(), mode) (tag_function(), "fopen"); would be better. Best, Oleg Abrosimov.