Permalink
Browse files

avoid breaking API change to system_category in boost system

  • Loading branch information...
1 parent 5c71b6b commit 100c6f93b38fbdb68d1b633e7fa12be6127b4a01 @erikfrey erikfrey committed Oct 2, 2012
Showing with 5 additions and 4 deletions.
  1. +3 −3 include/darner/queue/queue.h
  2. +2 −1 src/queue/queue.cpp
@@ -208,19 +208,19 @@ class queue
void put(const key_type& key, const std::string& value)
{
if (!journal_->Put(leveldb::WriteOptions(), key.slice(), value).ok())
- throw boost::system::system_error(boost::system::errc::io_error, boost::system::system_category());
+ throw boost::system::system_error(boost::system::errc::io_error, boost::asio::error::get_system_category());
}
void get(const key_type& key, std::string& result)
{
if (!journal_->Get(leveldb::ReadOptions(), key.slice(), &result).ok())
- throw boost::system::system_error(boost::system::errc::io_error, boost::system::system_category());
+ throw boost::system::system_error(boost::system::errc::io_error, boost::asio::error::get_system_category());
}
void write(leveldb::WriteBatch& batch)
{
if (!journal_->Write(leveldb::WriteOptions(), &batch).ok())
- throw boost::system::system_error(boost::system::errc::io_error, boost::system::system_category());
+ throw boost::system::system_error(boost::system::errc::io_error, boost::asio::error::get_system_category());
}
boost::scoped_ptr<comparator> cmp_;
View
@@ -128,7 +128,8 @@ void queue::pop_read(std::string& result_item, header_type& result_header, id_ty
else if (result_item[result_item.size() - 2] == '\0') // \0 \0 means escaped \0
result_item.resize(result_item.size() - 1);
else
- throw system::system_error(system::errc::io_error, system::system_category()); // anything else is bad data
+ throw system::system_error(system::errc::io_error,
+ boost::asio::error::get_system_category()); // anything else is bad data
}
++items_open_;

0 comments on commit 100c6f9

Please sign in to comment.