Skip to content

Commit 308a57c

Browse files
committed
error types are in system
1 parent 8617b2f commit 308a57c

File tree

12 files changed

+28
-87
lines changed

12 files changed

+28
-87
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost PREFIX "" FILES ${BO
8383
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "http_io" FILES ${BOOST_HTTP_IO_SOURCES})
8484
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES Jamfile)
8585

86-
add_library(boost_http_io ${BOOST_HTTP_IO_HEADERS} ${BOOST_HTTP_IO_SOURCES})
86+
add_library(boost_http_io ${BOOST_HTTP_IO_HEADERS} ${BOOST_HTTP_IO_SOURCES} build/Jamfile)
8787
target_link_libraries(boost_http_io PUBLIC Threads::Threads)
8888
add_library(Boost::http_io ALIAS boost_http_io)
8989
boost_http_io_setup_properties(boost_http_io)

build/Jamfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ project boost/http_io
2222

2323
alias http_io_sources
2424
:
25-
src.cpp
25+
detail/except.cpp
2626
;
2727

2828
explicit http_io_sources ;

example/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ class worker
463463
do_accept()
464464
{
465465
// Clean up any previous connection.
466-
io::error_code ec;
466+
system::error_code ec;
467467
sock_.close(ec);
468468
pr_.reset();
469469

include/boost/http_io.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#ifndef BOOST_HTTP_IO_HPP
1111
#define BOOST_HTTP_IO_HPP
1212

13-
#include <boost/http_io/error.hpp>
1413
#include <boost/http_io/read.hpp>
1514
#include <boost/http_io/write.hpp>
1615

include/boost/http_io/error.hpp

Lines changed: 0 additions & 27 deletions
This file was deleted.

include/boost/http_io/impl/read.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class read_body_op
128128
void
129129
operator()(
130130
Self& self,
131-
error_code ec = {},
131+
system::error_code ec = {},
132132
std::size_t bytes_transferred = 0)
133133
{
134134
BOOST_ASIO_CORO_REENTER(*this)

include/boost/http_io/impl/write.hpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
#ifndef BOOST_HTTP_IO_IMPL_WRITE_HPP
1111
#define BOOST_HTTP_IO_IMPL_WRITE_HPP
1212

13-
#include <boost/http_io/error.hpp>
1413
#include <boost/asio/append.hpp>
1514
#include <boost/asio/buffer.hpp>
1615
#include <boost/asio/compose.hpp>
1716
#include <boost/asio/coroutine.hpp>
1817
#include <boost/asio/post.hpp>
18+
#include <boost/system/error_code.hpp>
19+
#include <boost/system/result.hpp>
1920
#include <iterator>
2021

2122
namespace boost {
@@ -53,11 +54,11 @@ class write_some_op
5354
void
5455
operator()(
5556
Self& self,
56-
error_code ec,
57+
system::error_code ec,
5758
std::size_t bytes_transferred,
5859
bool do_post = false)
5960
{
60-
urls::result<buffers_type> rv;
61+
system::result<buffers_type> rv;
6162

6263
BOOST_ASIO_CORO_REENTER(*this)
6364
{
@@ -123,7 +124,7 @@ class write_op
123124
void
124125
operator()(
125126
Self& self,
126-
error_code ec = {},
127+
system::error_code ec = {},
127128
std::size_t bytes_transferred = 0)
128129
{
129130
BOOST_ASIO_CORO_REENTER(*this)
@@ -183,7 +184,7 @@ class relay_some_op
183184
void
184185
operator()(
185186
Self& self,
186-
error_code ec = {},
187+
system::error_code ec = {},
187188
std::size_t bytes_transferred = 0)
188189
{
189190
urls::result<
@@ -234,17 +235,17 @@ class relay_some_op
234235
template<
235236
class AsyncWriteStream,
236237
BOOST_ASIO_COMPLETION_TOKEN_FOR(
237-
void(error_code, std::size_t)) CompletionToken>
238+
void(system::error_code, std::size_t)) CompletionToken>
238239
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
239-
void (error_code, std::size_t))
240+
void (system::error_code, std::size_t))
240241
async_write_some(
241242
AsyncWriteStream& dest,
242243
http_proto::serializer& sr,
243244
CompletionToken&& token)
244245
{
245246
return asio::async_compose<
246247
CompletionToken,
247-
void(error_code, std::size_t)>(
248+
void(system::error_code, std::size_t)>(
248249
detail::write_some_op<
249250
AsyncWriteStream>{dest, sr},
250251
token, dest);
@@ -253,17 +254,17 @@ async_write_some(
253254
template<
254255
class AsyncWriteStream,
255256
BOOST_ASIO_COMPLETION_TOKEN_FOR(
256-
void(error_code, std::size_t)) CompletionToken>
257+
void(system::error_code, std::size_t)) CompletionToken>
257258
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
258-
void (error_code, std::size_t))
259+
void (system::error_code, std::size_t))
259260
async_write(
260261
AsyncWriteStream& dest,
261262
http_proto::serializer& sr,
262263
CompletionToken&& token)
263264
{
264265
return asio::async_compose<
265266
CompletionToken,
266-
void(error_code, std::size_t)>(
267+
void(system::error_code, std::size_t)>(
267268
detail::write_op<
268269
AsyncWriteStream>{dest, sr},
269270
token,
@@ -276,9 +277,9 @@ template<
276277
class AsyncReadStream,
277278
class CompletionCondition,
278279
BOOST_ASIO_COMPLETION_TOKEN_FOR(
279-
void(error_code, std::size_t)) CompletionToken>
280+
void(system::error_code, std::size_t)) CompletionToken>
280281
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
281-
void (error_code, std::size_t))
282+
void (system::error_code, std::size_t))
282283
async_relay_some(
283284
AsyncWriteStream& dest,
284285
AsyncReadStream& src,
@@ -288,7 +289,7 @@ async_relay_some(
288289
{
289290
return asio::async_compose<
290291
CompletionToken,
291-
void(error_code, std::size_t)>(
292+
void(system::error_code, std::size_t)>(
292293
detail::relay_some_op<
293294
AsyncWriteStream,
294295
AsyncReadStream,

include/boost/http_io/read.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
#define BOOST_HTTP_IO_READ_HPP
1212

1313
#include <boost/http_io/detail/config.hpp>
14-
#include <boost/http_io/error.hpp>
1514
#include <boost/http_proto/request_parser.hpp>
1615
#include <boost/http_proto/response_parser.hpp>
1716
#include <boost/asio/async_result.hpp>
17+
#include <boost/system/error_code.hpp>
1818
#include <boost/system/result.hpp>
1919
#include <cstdint>
2020

include/boost/http_io/write.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
#define BOOST_HTTP_IO_WRITE_HPP
1212

1313
#include <boost/http_io/detail/config.hpp>
14-
#include <boost/http_io/error.hpp>
1514
#include <boost/http_proto/serializer.hpp>
1615
#include <boost/asio/async_result.hpp>
16+
#include <boost/system/error_code.hpp>
1717

1818
namespace boost {
1919
namespace http_io {
@@ -23,9 +23,9 @@ namespace http_io {
2323
template<
2424
class AsyncWriteStream,
2525
BOOST_ASIO_COMPLETION_TOKEN_FOR(
26-
void(error_code, std::size_t)) CompletionToken>
26+
void(system::error_code, std::size_t)) CompletionToken>
2727
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
28-
void (error_code, std::size_t))
28+
void (system::error_code, std::size_t))
2929
async_write_some(
3030
AsyncWriteStream& dest,
3131
http_proto::serializer& sr,
@@ -36,9 +36,9 @@ async_write_some(
3636
template<
3737
class AsyncWriteStream,
3838
BOOST_ASIO_COMPLETION_TOKEN_FOR(
39-
void(error_code, std::size_t)) CompletionToken>
39+
void(system::error_code, std::size_t)) CompletionToken>
4040
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
41-
void (error_code, std::size_t))
41+
void (system::error_code, std::size_t))
4242
async_write(
4343
AsyncWriteStream& dest,
4444
http_proto::serializer& sr,
@@ -52,9 +52,9 @@ template<
5252
class AsyncReadStream,
5353
class CompletionCondition,
5454
BOOST_ASIO_COMPLETION_TOKEN_FOR(
55-
void(error_code, std::size_t)) CompletionToken>
55+
void(system::error_code, std::size_t)) CompletionToken>
5656
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
57-
void (error_code, std::size_t))
57+
void (system::error_code, std::size_t))
5858
async_relay_some(
5959
AsyncWriteStream& dest,
6060
AsyncReadStream& src,

test/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ set(EXTRAFILES
1414

1515
set(PFILES
1616
CMakeLists.txt
17-
#Jamfile
17+
Jamfile
1818
buffer.cpp
19-
error.cpp
2019
read.cpp
2120
sandbox.cpp
2221
write.cpp

test/Jamfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ project
2727
;
2828

2929
local SOURCES =
30-
error.cpp
3130
read.cpp
3231
sandbox.cpp
3332
write.cpp

test/error.cpp

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)