[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-users
Subject:    [Boost-users] [asio] Breaking changes committed to cvs HEAD
From:       Christopher Kohlhoff <chris () kohlhoff ! com>
Date:       2006-11-08 5:45:11
Message-ID: 20061108054514.34018.qmail () web32604 ! mail ! mud ! yahoo ! com
[Download RAW message or body]

I have just committed some asio changes to cvs HEAD that will
break application code. These changes are part of what's needed
to bring the interface into sync with the TR2 proposal. The big
change is to the error handling classes, as described below.

An async handler of the form:

  void my_handler(const boost::asio::error& e);

becomes:

  void my_handler(const boost::system::error_code& e);

Synchronous error handling like this:

  boost::asio::error e;
  sock.connect(ep, boost::asio::assign_error(e));

becomes:

  boost::system::error_code e;
  sock.connect(ep, e);

And where previously a boost::asio::error exception was thrown,
the new exception thrown is boost::system::system_error.

Error constants like boost::asio::error::eof stay as they are,
i.e.:

  void my_handler(const boost::system::error_code& e)
  {
    if (e == boost::asio::error::eof)
    {
      ...
    }
  }

Programs will now need to link against the boost.system library
(which is where boost::system::error_code and
boost::system::system_error reside).

Once I do a few more TR2-related changes I will post regenerated
doxygen documentation to the vault. Stay tuned.

Cheers,
Chris




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic