libcsdbg  1.28
C++ exception (and generic) stack trace debug library
std::ostream& csdbg::operator<< ( std::ostream &  lval,
const exception &  rval 
)

Stream insertion operator for csdbg::exception objects.

Parameters
[in]lvalthe output stream
[in]rvalthe object to output
Returns
its first argument

Definition at line 42 of file exception.cpp.

References csdbg::util::header(), likely, csdbg::util::lock(), csdbg::exception::m_msg, and csdbg::util::unlock().

43 {
44  util::lock();
45  util::header(lval, "x");
46 
47  if ( likely(rval.m_msg != NULL) )
48  lval << rval.m_msg << "\r\n";
49  else
50  lval << "n/a\r\n";
51 
52  util::unlock();
53  return lval;
54 }
#define likely(expr)
Offer a hint (positive) to the pipeline branch predictor.
Definition: config.hpp:344

+ Here is the call graph for this function: