namespace
boost
{
template <class ErrorInfo,class E>
shared_ptr<typename ErrorInfo::value_type const> get_error_info( E const & x );
}
Requirements:
ErrorInfo must be an instance of the error_info template.
E must be polymorphic.
The get_error_info function must not be called outside of a catch block.
Returns:
If dynamic_cast<boost::exception const *>(&x) is 0, or if x does not store an object of type ErrorInfo, the returned value is an empty shared_ptr.
Otherwise, the returned shared_ptr points to the stored value (use operator<< to store values in exception objects.) The shared_ptr is valid even after x has been destroyed.