forked from boostorg/exception
get_error_info returns raw pointer instead of shared_ptr (breaking change)
diagnostic_information can now be called with boost::exception or std::exception object. BOOST_THROW_EXCEPTION can now be used even if exceptions are disabled. added functions: current_exception_diagnostic_information, current_exception_cast documentation updated to match. [SVN r52225]
This commit is contained in:
34
include/boost/exception/current_exception_cast.hpp
Normal file
34
include/boost/exception/current_exception_cast.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef UUID_7E83C166200811DE885E826156D89593
|
||||
#define UUID_7E83C166200811DE885E826156D89593
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
template <class E>
|
||||
inline
|
||||
E *
|
||||
current_exception_cast()
|
||||
{
|
||||
try
|
||||
{
|
||||
throw;
|
||||
}
|
||||
catch(
|
||||
E & e )
|
||||
{
|
||||
return &e;
|
||||
}
|
||||
catch(
|
||||
...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user