<p>Boost Exception provides a namespace-scope function <spanclass="RenoLink"><ahref="diagnostic_information.html">diagnostic_information</a></span> which takes a boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span>. The returned string contains:</p>
<div><ul><li>the string representation of all data objects added to the boost::<spanclass="RenoLink"><ahref="exception.html">exception</a></span> through <spanclass="RenoLink"><ahref="exception_operator_shl.html">operator<<</a></span>;</li>
<p>The returned string is not presentable as a friendly user message, but because it is generated automatically, it is useful for debugging or logging purposes. Here is an example:</p>
<p>this is a possible output from the <spanclass="RenoLink"><ahref="diagnostic_information.html">diagnostic_information</a></span> function, as used in <i>libs/exception/example/example_io.cpp:</i></p>
<pre>libs\exception\example\example_io.cpp(83): Throw in function class boost::shared_ptr<struct _iobuf> __cdecl my_fopen(const char *,const char *)
Dynamic exception type: class boost::exception_detail::clone_impl<class fopen_error>
std::exception::what: example_io error
[struct tag_errno *] = 2, OS says "No such file or directory"