15 #define epicsExportSharedSymbols 20 namespace epics{
namespace pvData {
25 fprintf(fp,
"On line %d of %s\n",m_line,m_file);
27 #if defined(EXCEPT_USE_BACKTRACE) 30 backtrace_symbols_fd(m_stack, m_depth, fileno(fp));
31 fprintf(fp,
"To translate run 'addr2line -e execname 0xXXXXXXX ...'\n" 32 " Note: Must be compiled with debug symbols\n");
40 std::ostringstream out;
42 out<<
"On line "<<m_line<<
" of "<<m_file<<
"\n";
44 #if defined(EXCEPT_USE_BACKTRACE) 47 char **symbols=backtrace_symbols(m_stack, m_depth);
49 for(
int i=0;
i<m_depth;
i++) {
50 out<<symbols[
i]<<
"\n";
65 if (base_msg.size()==0) {
66 const char *
base=std::logic_error::what();
74 out.reserve(strlen(base)+1+stack.size()+1);
85 return base_msg.c_str();
86 }
catch(std::bad_alloc&) {
87 return "BaseException::what - Insufficient memory to construct message";
89 return "BaseException::what - Unknown error when constructing message";
void print(FILE *fp=stderr) const
TODO only here because of the Lockable.
virtual const char * what() const