31 #define ECTO_EXCEPTION_TAG_NAMES \ 32 (from_typename)(to_typename)(from_key)(to_key)(from_cell) \ 33 (to_cell)(cpp_typename)(pyobject_repr)(actualtype_hint)(spore_typename) \ 34 (diag_msg)(actualkeys_hint)(tendril_key)(cell_name)(cell_type)(function_name) \ 35 (hint)(which_tendrils)(prev_typename)(cur_typename)(type) \ 38 #define ECTO_EXCEPTIONS \ 39 (TypeMismatch)(ValueNone)(ValueRequired)(NonExistant) \ 40 (FailedFromPythonConversion)(TendrilRedeclaration)(CellException) \ 41 (NotConnected)(AlreadyConnected)(NullTendril) 44 # ifndef BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP 45 # define BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP 47 # define ECTO_PP_ITERLIMIT 22 48 # define BOOST_PP_LIMIT_MAG ECTO_PP_ITERLIMIT 49 # define BOOST_PP_LIMIT_TUPLE 25 50 # define BOOST_PP_LIMIT_DIM 3 51 # define BOOST_PP_LIMIT_REPEAT ECTO_PP_ITERLIMIT 52 # define BOOST_PP_LIMIT_WHILE ECTO_PP_ITERLIMIT 53 # define BOOST_PP_LIMIT_FOR ECTO_PP_ITERLIMIT 54 # define BOOST_PP_LIMIT_ITERATION ECTO_PP_ITERLIMIT 55 # define BOOST_PP_LIMIT_ITERATION_DIM 2 56 # define BOOST_PP_LIMIT_SEQ ECTO_PP_ITERLIMIT 57 # define BOOST_PP_LIMIT_SLOT_SIG 10 58 # define BOOST_PP_LIMIT_SLOT_COUNT 5 63 #include <boost/version.hpp> 67 #include <ecto/config.hpp> 69 #include <boost/optional.hpp> 71 #include <boost/exception/exception.hpp> 72 #include <boost/exception/info.hpp> 74 #include <boost/preprocessor/cat.hpp> 75 #include <boost/preprocessor/stringize.hpp> 76 #include <boost/preprocessor/seq/for_each.hpp> 89 :
public ::boost::exception_detail::error_info_container
91 typedef ::boost::exception_detail::type_info_
type_info_;
98 #if defined(ECTO_EXCEPTION_SHARED_POINTERS_ARE_CONST) 113 set(error_info_base_ptr const & x,
114 type_info_ const & typeid_);
117 get( type_info_ const & ti ) const;
119 char const * diagnostic_information(
120 #if defined(ECTO_EXCEPTION_DIAGNOSTIC_IMPL_TAKES_CHARSTAR) 126 friend class boost::exception;
128 typedef std::map<std::string, error_info_base_ptr>
134 void add_ref()
const;
135 #if defined(ECTO_EXCEPTION_RELEASE_RETURNS_VOID) 136 void release()
const;
138 bool release()
const;
140 #if defined(ECTO_EXCEPTION_HAS_CLONE) 141 ::boost::exception_detail::refcount_ptr< ::boost::exception_detail::error_info_container> clone()
const;
149 virtual const char* what()
const throw();
154 #define ECTO_DECLARE_EXCEPTION(r, data, T) \ 155 struct T : virtual EctoException \ 157 const char* what() const throw(); \ 165 const std::string& tag);
167 #define ECTO_EXCEPTION_TAG_DECL(r, data, NAME) \ 168 struct BOOST_PP_CAT(tag_, NAME); \ 169 typedef ::boost::error_info<detail::wrap<BOOST_PP_CAT(tag_, NAME)>, \ 179 #if defined(ECTO_EXCEPTION_TAG_TYPE_NAME_RETURNS_STRING) 180 # define ECTO_EXCEPTION_TAG_TYPE_NAME_RETURN_T std::string 182 # define ECTO_EXCEPTION_TAG_TYPE_NAME_RETURN_T const char* 185 #define ECTO_EXCEPTION_TAG_TYPE_NAME_DECL(r, data, NAME) \ 187 ECTO_EXCEPTION_TAG_TYPE_NAME_RETURN_T \ 188 tag_type_name< ::ecto::except::detail::wrap< BOOST_PP_CAT(::ecto::except::tag_, NAME)> >() { \ 189 return BOOST_PP_STRINGIZE(NAME); \ 193 template <
class E,
class Tag,
class T>
194 #if ((BOOST_VERSION / 100) % 1000) <= 42 197 typename enable_if<exception_detail::derives_boost_exception<E>,E
const &>::type
::boost::exception_detail::error_info_base error_info_base
Definition: except.hpp:92
const ecto::tendril & get(const std::string &type_name)
#define ECTO_EXCEPTIONS
Definition: except.hpp:38
Definition: std_map_indexing_suite.hpp:20
#define ECTO_EXCEPTION_TAG_DECL(r, data, NAME)
Definition: except.hpp:167
Definition: except.hpp:146
#define ECTO_EXCEPTION_TAG_TYPE_NAME_DECL(r, data, NAME)
Definition: except.hpp:185
std::string diagnostic_info_str_
Definition: except.hpp:131
const char * diagnostic_information_arg_t
Definition: except.hpp:103
std::map< std::string, error_info_base_ptr > error_info_map
Definition: except.hpp:129
Definition: parameters.hpp:11
Definition: except.hpp:88
#define ECTO_EXCEPTION_TAG_NAMES
Definition: except.hpp:31
int count_
Definition: except.hpp:132
BOOST_PP_SEQ_FOR_EACH(ECTO_DECLARE_EXCEPTION,~, ECTO_EXCEPTIONS)
error_info_map info_
Definition: except.hpp:130
Definition: except.hpp:85
std::string diagnostic_string(const EctoException &)
#define ECTO_DECLARE_EXCEPTION(r, data, T)
Definition: except.hpp:154
::boost::exception_detail::type_info_ type_info_
Definition: except.hpp:91
E const & operator<<(E const &x, error_info< ::ecto::except::detail::wrap< Tag >, T > const &v)
boost::shared_ptr< error_info_base > error_info_base_ptr
Definition: except.hpp:102