85 std::string baseMsg = std::string(
"Level ") +
86 boost::lexical_cast<std::string>(level) +
87 std::string(
" assertion violation\n") +
88 #if defined(NEKTAR_DEBUG) || defined(NEKTAR_FULLDEBUG)
89 std::string(
"Where : ") + boost::lexical_cast<std::string>(routine) + std::string(
"[") + boost::lexical_cast<std::string>(lineNumber) + std::string(
"]\n") + std::string(
"Message : ") +
96 #if defined(NEKTAR_USE_MPI)
98 MPI_Initialized(&flag);
101 MPI_Comm_rank(MPI_COMM_WORLD,&rank);
105 std::string btMessage(
"");
106 #if defined(NEKTAR_FULLDEBUG)
112 btSize = backtrace(btArray, 40);
113 btStrings = backtrace_symbols(btArray, btSize);
115 for (
int i = 0 ; i < btSize ; ++i)
117 btMessage += std::string(btStrings[i]) +
"\n";
130 (*outStream) << btMessage;
131 (*outStream) <<
"Fatal : " << baseMsg << std::endl;
135 std::cerr << btMessage;
136 std::cerr << std::endl <<
"Fatal : " << baseMsg
140 #if defined(NEKTAR_USE_MPI)
143 MPI_Barrier(MPI_COMM_WORLD);
146 throw NekError(baseMsg);
153 (*outStream) << btMessage;
154 (*outStream) <<
"Warning: " << baseMsg << std::endl;
158 std::cerr << btMessage;
159 std::cerr <<
"Warning: " << baseMsg << std::endl;
164 std::cerr <<
"Unknown warning type: " << baseMsg << std::endl;
static boost::optional< std::ostream & > outStream