Skip to content

Commit

Permalink
Merge pull request #1417 from evoskuil/master
Browse files Browse the repository at this point in the history
Remove dead code (error::unknown).
  • Loading branch information
evoskuil authored Mar 11, 2024
2 parents e1e8652 + 7783b7d commit 465f319
Showing 3 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion include/bitcoin/system/error/error_t.hpp
Original file line number Diff line number Diff line change
@@ -39,7 +39,6 @@ namespace error {
enum error_t
{
success = 0,
unknown,
not_found,
not_implemented,

1 change: 0 additions & 1 deletion src/error/error_t.cpp
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ namespace error {
DEFINE_ERROR_T_MESSAGE_MAP(error)
{
{ success, "success" },
{ unknown, "unknown error" },
{ not_found, "object does not exist" },
{ not_implemented, "feature not implemented" }
////{ error_last, "unmapped code" }
9 changes: 0 additions & 9 deletions test/error/error_t.cpp
Original file line number Diff line number Diff line change
@@ -31,15 +31,6 @@ BOOST_AUTO_TEST_CASE(error_t__code__success__false_exected_message)
BOOST_REQUIRE_EQUAL(ec.message(), "success");
}

BOOST_AUTO_TEST_CASE(error_t__code__unknown__true_exected_message)
{
constexpr auto value = error::unknown;
const auto ec = code(value);
BOOST_REQUIRE(ec);
BOOST_REQUIRE(ec == value);
BOOST_REQUIRE_EQUAL(ec.message(), "unknown error");
}

BOOST_AUTO_TEST_CASE(error_t__code__not_found__true_exected_message)
{
constexpr auto value = error::not_found;

0 comments on commit 465f319

Please sign in to comment.