81 std::string baseMsg = std::string(
"Level ") +
82 boost::lexical_cast<std::string>(level) +
83 std::string(
" assertion violation\n") +
84 #if defined(NEKTAR_DEBUG) || defined(NEKTAR_FULLDEBUG)
85 std::string(
"Where : ") + boost::lexical_cast<std::string>(routine) + std::string(
"[") + boost::lexical_cast<std::string>(lineNumber) + std::string(
"]\n") + std::string(
"Message : ") +
89 std::string btMessage(
"");
90 #if defined(NEKTAR_FULLDEBUG)
96 btSize = backtrace(btArray, 40);
97 btStrings = backtrace_symbols(btArray, btSize);
99 for (
int i = 0 ; i < btSize ; ++i)
101 btMessage += std::string(btStrings[i]) +
"\n";
111 (*outStream) << btMessage;
112 (*outStream) <<
"Fatal : " << baseMsg << std::endl;
116 std::cerr << btMessage;
117 std::cerr << std::endl <<
"Fatal : " << baseMsg << std::endl;
120 throw NekError(baseMsg);
126 (*outStream) << btMessage;
127 (*outStream) <<
"Warning: " << baseMsg << std::endl;
131 std::cerr << btMessage;
132 std::cerr <<
"Warning: " << baseMsg << std::endl;
137 std::cerr <<
"Unknown warning type: " << baseMsg << std::endl;
static boost::optional< std::ostream & > outStream