#include "uptr.h" #include #include #include #include #include namespace MirrorSearch { std::string failingFunction(void * const func) { char ** fn = backtrace_symbols(&func, 1); BOOST_ASSERT(fn); BOOST_ASSERT(*fn); std::string funcName(*fn); free(fn); return funcName; } void defaultErrorHandler(const std::string & fn) { throw std::runtime_error("Fatal error in " + fn); } }