#include "stdafx.h" #include #include int test_main(int, char *[]) { using namespace boost::property_tree; ptree pt; pt.put("a",1000000); try { pt.get("a"); BOOST_ERROR("No required exception thrown"); } catch (boost::property_tree::ptree_bad_data &) { } catch (...) { BOOST_ERROR("Wrong exception type thrown"); } try { pt.get("a"); BOOST_ERROR("No required exception thrown"); } catch (boost::property_tree::ptree_bad_data &) { } catch (...) { BOOST_ERROR("Wrong exception type thrown"); } return 0; }