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

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.

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
static void lock()
Lock the global access mutex.
Definition: util.cpp:397
static void unlock()
Unlock the global access mutex.
Definition: util.cpp:406
static void header(std::ostream &, const i8 *)
Print a tagged message header on an output stream.
Definition: util.cpp:594