17 #ifndef KAAEXCEPTION_HPP_
18 #define KAAEXCEPTION_HPP_
20 #include <boost/format.hpp>
33 ss <<
"[Kaa OpenSource Project] Instruction failed! Details: \"" << f
34 <<
"\" Original message: " << std::exception::what();
36 char **messages = (
char **)
nullptr;
37 int i, trace_size = 0;
38 trace_size = backtrace(trace, 16);
39 messages = backtrace_symbols(trace, trace_size);
40 ss << std::endl <<
"Backtrace: " << std::endl;
41 for (i = 0; i < trace_size; ++i) {
42 ss <<
"[" << i <<
"] " << messages[i] << std::endl;
49 ss <<
"[Kaa OpenSource Project] Instruction failed! Details: \"" << message
50 <<
"\" Original message: " << std::exception::what();
52 char **messages = (
char **)
nullptr;
53 int i, trace_size = 0;
54 trace_size = backtrace(trace, 16);
55 messages = backtrace_symbols(trace, trace_size);
56 ss << std::endl <<
"Backtrace: " << std::endl;
57 for (i = 0; i < trace_size; ++i) {
58 ss <<
"[" << i <<
"] " << messages[i] << std::endl;
63 virtual const char *
what()
const throw () {
64 return message_.c_str();
KaaException(const std::string &message)
virtual const char * what() const
KaaException(boost::format f)