/usr/include/boost/exception
NameSizeModeActions
detail/-0755rm
all.hpp11100644editdlrm
current_exception_cast.hpp9930644editdlrm
diagnostic_information.hpp65230644editdlrm
enable_current_exception.hpp3850644editdlrm
enable_error_info.hpp3850644editdlrm
errinfo_api_function.hpp6690644editdlrm
errinfo_at_line.hpp5690644editdlrm
errinfo_errno.hpp13190644editdlrm
errinfo_file_handle.hpp5700644editdlrm
errinfo_file_name.hpp7450644editdlrm
errinfo_file_open_mode.hpp7550644editdlrm
errinfo_nested_exception.hpp5980644editdlrm
errinfo_type_info_name.hpp6590644editdlrm
error_info.hpp4090644editdlrm
exception.hpp124190644editdlrm
get_error_info.hpp37240644editdlrm
info.hpp87160644editdlrm
info_tuple.hpp24130644editdlrm
to_string.hpp22910644editdlrm
to_string_stub.hpp30550644editdlrm
Edit: /usr/include/boost/exception/get_error_info.hpp (3724B)
//Copyright (c) 2006-2009 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 BOOST_EXCEPTION_1A590226753311DD9E4CCF6156D89593 #define BOOST_EXCEPTION_1A590226753311DD9E4CCF6156D89593 #include #include #include #include #include #include #ifndef BOOST_EXCEPTION_ENABLE_WARNINGS #if __GNUC__*100+__GNUC_MINOR__>301 #pragma GCC system_header #endif #ifdef __clang__ #pragma clang system_header #endif #ifdef _MSC_VER #pragma warning(push,1) #endif #endif namespace boost { namespace exception_detail { template struct get_info { static typename ErrorInfo::value_type * get( exception const & x ) { if( exception_detail::error_info_container * c=x.data_.get() ) if( shared_ptr eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) ) { #ifndef BOOST_NO_RTTI BOOST_ASSERT( 0!=dynamic_cast(eib.get()) ); #endif ErrorInfo * w = static_cast(eib.get()); return &w->value(); } return 0; } }; template <> struct get_info { static char const * * get( exception const & x ) { return x.throw_function_ ? &x.throw_function_ : 0; } }; template <> struct get_info { static char const * * get( exception const & x ) { return x.throw_file_ ? &x.throw_file_ : 0; } }; template <> struct get_info { static int * get( exception const & x ) { return x.throw_line_!=-1 ? &x.throw_line_ : 0; } }; template struct get_error_info_return_type { typedef R * type; }; template struct get_error_info_return_type { typedef R const * type; }; } #ifdef BOOST_NO_RTTI template inline typename ErrorInfo::value_type const * get_error_info( boost::exception const & x ) { return exception_detail::get_info::get(x); } template inline typename ErrorInfo::value_type * get_error_info( boost::exception & x ) { return exception_detail::get_info::get(x); } #else template inline typename exception_detail::get_error_info_return_type::type get_error_info( E & some_exception ) { if( exception const * x = dynamic_cast(&some_exception) ) return exception_detail::get_info::get(*x); else return 0; } #endif } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif