CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
except.cc
Go to the documentation of this file.
1 
5 #include "publish/except.h"
6 
7 #include <execinfo.h>
8 
9 #include <string>
10 
12 
14  std::string result;
15  void *addr[kMaxBacktrace];
16  int num_addr = backtrace(addr, kMaxBacktrace);
17  char **symbols = backtrace_symbols(addr, num_addr);
18  for (int i = 0; i < num_addr; ++i)
19  result += std::string(symbols[i]) + "\n";
20  return result;
21 }
virtual ~EPublish()
Definition: except.cc:11
static std::string GetStacktrace()
Definition: except.cc:13