Tidy up error types:

* Restructure header material
* Clean up namespace type injections
* Remove extraneous 'success' constants
This commit is contained in:
Vinnie Falco
2016-10-04 18:00:11 -04:00
parent d54d597f76
commit 60e637bd69
23 changed files with 260 additions and 292 deletions
+7 -6
View File
@@ -23,11 +23,13 @@ public:
BEAST_EXPECT(std::string{ec.category().name()} == name);
BEAST_EXPECT(! ec.message().empty());
BEAST_EXPECT(std::addressof(ec.category()) ==
std::addressof(get_parse_error_category()));
BEAST_EXPECT(get_parse_error_category().equivalent(static_cast<int>(ev),
ec.category().default_error_condition(static_cast<int>(ev))));
BEAST_EXPECT(get_parse_error_category().equivalent(
ec, static_cast<int>(ev)));
std::addressof(detail::get_parse_error_category()));
BEAST_EXPECT(detail::get_parse_error_category().equivalent(
static_cast<std::underlying_type<parse_error>::type>(ev),
ec.category().default_error_condition(
static_cast<std::underlying_type<parse_error>::type>(ev))));
BEAST_EXPECT(detail::get_parse_error_category().equivalent(
ec, static_cast<std::underlying_type<parse_error>::type>(ev)));
}
void run() override
@@ -37,7 +39,6 @@ public:
check("http", parse_error::bad_uri);
check("http", parse_error::bad_version);
check("http", parse_error::bad_crlf);
check("http", parse_error::bad_request);
check("http", parse_error::bad_status);
check("http", parse_error::bad_reason);
check("http", parse_error::bad_field);