Sergey Shpikin
2016-10-26 15:48:55 UTC
I have this little example of Boost.Asio code:
http://codepad.org/tuQedXI7 It works as expected on Linux producing
1
2
Caught Host not found (authoritative)
but on Windows it crashes with:
1
2
terminate called after throwing an instance of 'boost::system::system_error'
what(): Unknown error
Tested on Windows Server 2008, Windows 7 and Wine, everything is the
same. I'm compiling on Linux for Windows with MXE ( http://mxe.cc/ )
on GCC 4.9.4, Boost version is 1.60.0. I'm really stuck at this point
as nothing in Google looks a valid solution for the case and I already
have a working application on Linux but it crashes on any network
error on Windows.
On Windows coroutines prevent any exceptions from being caught when
the program is compiled with -O1/2/3 but they're caught with -O0 or
-Os (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267 — this is
about GCC on FreeBSD but the same seemingly applies to MinGW).
However, boost's own exceptions, like the aforementioned
boost::system::system_error, still can't be caught.
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List yo
http://codepad.org/tuQedXI7 It works as expected on Linux producing
1
2
Caught Host not found (authoritative)
but on Windows it crashes with:
1
2
terminate called after throwing an instance of 'boost::system::system_error'
what(): Unknown error
Tested on Windows Server 2008, Windows 7 and Wine, everything is the
same. I'm compiling on Linux for Windows with MXE ( http://mxe.cc/ )
on GCC 4.9.4, Boost version is 1.60.0. I'm really stuck at this point
as nothing in Google looks a valid solution for the case and I already
have a working application on Linux but it crashes on any network
error on Windows.
On Windows coroutines prevent any exceptions from being caught when
the program is compiled with -O1/2/3 but they're caught with -O0 or
-Os (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54267 — this is
about GCC on FreeBSD but the same seemingly applies to MinGW).
However, boost's own exceptions, like the aforementioned
boost::system::system_error, still can't be caught.
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List yo