1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #ifndef BOOST_PROPERTY_TREE_DETAIL_EXCEPTIONS_IMPLEMENTATION_HPP_INCLUDED
- #define BOOST_PROPERTY_TREE_DETAIL_EXCEPTIONS_IMPLEMENTATION_HPP_INCLUDED
- namespace boost { namespace property_tree
- {
- namespace detail
- {
-
- template<class P> inline
- std::string prepare_bad_path_what(const std::string &what,
- const P &path)
- {
- return what + " (" + path.dump() + ")";
- }
- }
-
-
- inline ptree_error::ptree_error(const std::string &w):
- std::runtime_error(w)
- {
- }
- inline ptree_error::~ptree_error() throw()
- {
- }
-
-
- template<class D> inline
- ptree_bad_data::ptree_bad_data(const std::string &w, const D &d):
- ptree_error(w), m_data(d)
- {
- }
- inline ptree_bad_data::~ptree_bad_data() throw()
- {
- }
- template<class D> inline
- D ptree_bad_data::data() const
- {
- return boost::any_cast<D>(m_data);
- }
-
-
- template<class P> inline
- ptree_bad_path::ptree_bad_path(const std::string &w, const P &p):
- ptree_error(detail::prepare_bad_path_what(w, p)), m_path(p)
- {
- }
- inline ptree_bad_path::~ptree_bad_path() throw()
- {
- }
- template<class P> inline
- P ptree_bad_path::path() const
- {
- return boost::any_cast<P>(m_path);
- }
- }}
- #endif
|