Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:45:08

0001 /*
0002  *          Copyright Andrey Semashev 2007 - 2015.
0003  * Distributed under the Boost Software License, Version 1.0.
0004  *    (See accompanying file LICENSE_1_0.txt or copy at
0005  *          http://www.boost.org/LICENSE_1_0.txt)
0006  */
0007 /*!
0008  * \file   support/exception.hpp
0009  * \author Andrey Semashev
0010  * \date   18.07.2009
0011  *
0012  * This header enables Boost.Exception support for Boost.Log.
0013  */
0014 
0015 #ifndef BOOST_LOG_SUPPORT_EXCEPTION_HPP_INCLUDED_
0016 #define BOOST_LOG_SUPPORT_EXCEPTION_HPP_INCLUDED_
0017 
0018 #include <string>
0019 #include <boost/type_index.hpp>
0020 #include <boost/exception/info.hpp>
0021 #include <boost/log/detail/config.hpp>
0022 #include <boost/log/attributes/attribute_name.hpp>
0023 #include <boost/log/attributes/named_scope.hpp>
0024 #include <boost/log/detail/header.hpp>
0025 
0026 #ifdef BOOST_HAS_PRAGMA_ONCE
0027 #pragma once
0028 #endif
0029 
0030 namespace boost {
0031 
0032 BOOST_LOG_OPEN_NAMESPACE
0033 
0034 /*!
0035  * Attribute name exception information
0036  */
0037 typedef error_info< struct attribute_name_info_tag, attribute_name > attribute_name_info;
0038 
0039 /*!
0040  * Type info exception information
0041  */
0042 typedef error_info< struct type_info_info_tag, typeindex::type_index > type_info_info;
0043 
0044 /*!
0045  * Parse position exception information
0046  */
0047 typedef error_info< struct position_info_tag, unsigned int > position_info;
0048 
0049 /*!
0050  * Current scope exception information
0051  */
0052 typedef error_info< struct current_scope_info_tag, attributes::named_scope_list > current_scope_info;
0053 
0054 /*!
0055  * The function returns an error information object that contains current stack of scopes.
0056  * This information can then be attached to an exception and extracted at the catch site.
0057  * The extracted scope list won't be affected by any scope changes that may happen during
0058  * the exception propagation.
0059  *
0060  * \note See the \c named_scope attribute documentation on how to maintain scope list.
0061  */
0062 inline current_scope_info current_scope()
0063 {
0064     return current_scope_info(attributes::named_scope::get_scopes());
0065 }
0066 
0067 namespace ipc {
0068 
0069 class object_name;
0070 
0071 /*!
0072  * System resource name
0073  */
0074 typedef error_info< struct object_name_tag, object_name > object_name_info;
0075 
0076 } // namespace ipc
0077 
0078 BOOST_LOG_CLOSE_NAMESPACE // namespace log
0079 
0080 } // namespace boost
0081 
0082 #include <boost/log/detail/footer.hpp>
0083 
0084 #endif // BOOST_LOG_SUPPORT_EXCEPTION_HPP_INCLUDED_