26 #ifndef NFD_CORE_EXTENDED_ERROR_MESSAGE_HPP 27 #define NFD_CORE_EXTENDED_ERROR_MESSAGE_HPP 29 #include <boost/exception/get_error_info.hpp> 38 std::ostringstream errorMessage;
39 errorMessage << exception.what();
41 const char*
const* file = boost::get_error_info<boost::throw_file>(exception);
42 const int* line = boost::get_error_info<boost::throw_line>(exception);
43 const char*
const* func = boost::get_error_info<boost::throw_function>(exception);
45 errorMessage <<
" [from " << *file <<
":" << *line;
47 errorMessage <<
" in " << *func;
52 return errorMessage.str();
57 #endif // NFD_CORE_EXTENDED_ERROR_MESSAGE_HPP std::string getExtendedErrorMessage(const E &exception)
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...