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

Stream insertion operator for csdbg::tracer objects.

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

Definition at line 587 of file tracer.cpp.

References csdbg::util::lock(), csdbg::tracer::trace(), csdbg::util::unlock(), and csdbg::tracer::unwind().

588 {
589  util::lock();
590  try {
591  string buf;
592  rval.trace(buf);
593  lval << buf;
594 
595  util::unlock();
596  return lval;
597  }
598 
599  catch (exception &x) {
600  lval << x;
601  }
602 
603  catch (std::exception &x) {
604  lval << x;
605  }
606 
607  rval.unwind();
608  util::unlock();
609  return lval;
610 }

+ Here is the call graph for this function: