File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -310,6 +310,13 @@ sub copy_source_file
310310 last if $line =~ / boostify: non-boost docs end here/ ;
311311 }
312312 }
313+ elsif ($line =~ / boostify: non-boost code starts here/ )
314+ {
315+ while ($line = <$input >)
316+ {
317+ last if $line =~ / boostify: non-boost code ends here/ ;
318+ }
319+ }
313320 elsif ($line =~ / ^$ / && $needs_doc_link )
314321 {
315322 $needs_doc_link = 0;
Original file line number Diff line number Diff line change @@ -33,8 +33,23 @@ void do_throw_error(const asio::error_code& err)
3333
3434void do_throw_error (const asio::error_code& err, const char * location)
3535{
36+ // boostify: non-boost code starts here
37+ #if defined(ASIO_MSVC) && defined(ASIO_HAS_STD_SYSTEM_ERROR)
38+ // Microsoft's implementation of std::system_error is non-conformant in that
39+ // it ignores the error code's message when a "what" string is supplied. We'll
40+ // work around this by explicitly formatting the "what" string.
41+ std::string what_msg = location;
42+ what_msg += " : " ;
43+ what_msg += err.message ();
44+ asio::system_error e (err, what_msg);
45+ asio::detail::throw_exception (e);
46+ #else // defined(ASIO_MSVC) && defined(ASIO_HAS_STD_SYSTEM_ERROR)
47+ // boostify: non-boost code ends here
3648 asio::system_error e (err, location);
3749 asio::detail::throw_exception (e);
50+ // boostify: non-boost code starts here
51+ #endif // defined(ASIO_MSVC) && defined(ASIO_HAS_STD_SYSTEM_ERROR)
52+ // boostify: non-boost code ends here
3853}
3954
4055} // namespace detail
You can’t perform that action at this time.
0 commit comments