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

Stream insertion operator for csdbg::parser objects.

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

Definition at line 128 of file parser.cpp.

References csdbg::parser::highlight(), csdbg::util::lock(), and csdbg::util::unlock().

129 {
130  util::lock();
131 
132  /* If an exception occurs, output its details instead of rval */
133  try {
134  string *buf = rval.highlight();
135  lval << *buf;
136  delete buf;
137  }
138 
139  catch (exception &x) {
140  lval << x;
141  }
142 
143  catch (std::exception &x) {
144  lval << x;
145  }
146 
147  util::unlock();
148  return lval;
149 }

+ Here is the call graph for this function: