Skip to content

Commit adebde9

Browse files
fix(reply_builder): split SendError(ErrorReply) into SendError(status) and SendError(str, type) methods
fixes #3190 Signed-off-by: Stepan Bagritsevich <[email protected]>
1 parent 50f3ffb commit adebde9

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

src/facade/reply_builder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ class SinkReplyBuilder {
7979
}
8080

8181
virtual void SendError(std::string_view str, std::string_view type = {}) = 0; // MC and Redis
82-
virtual void SendError(ErrorReply error);
8382
virtual void SendError(OpStatus status);
83+
void SendError(ErrorReply error);
8484

8585
virtual void SendStored() = 0; // Reply for set commands.
8686
virtual void SendSetSkipped() = 0;

src/facade/reply_capture.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ void CapturingReplyBuilder::SendError(std::string_view str, std::string_view typ
2121
Capture(Error{str, type});
2222
}
2323

24-
void CapturingReplyBuilder::SendError(ErrorReply error) {
25-
SKIP_LESS(ReplyMode::ONLY_ERR);
26-
Capture(Error{error.ToSv(), error.kind});
27-
}
28-
2924
void CapturingReplyBuilder::SendMGetResponse(MGetResponse resp) {
3025
SKIP_LESS(ReplyMode::FULL);
3126
Capture(std::move(resp));

src/facade/reply_capture.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ class CapturingReplyBuilder : public RedisReplyBuilder {
2424

2525
public:
2626
void SendError(std::string_view str, std::string_view type = {}) override;
27-
void SendError(ErrorReply error) override;
2827
void SendMGetResponse(MGetResponse resp) override;
2928

3029
// SendStored -> SendSimpleString("OK")
3130
// SendSetSkipped -> SendNull()
3231
void SendError(OpStatus status) override;
32+
using RedisReplyBuilder::SendError;
3333

3434
void SendNullArray() override;
3535
void SendEmptyArray() override;

0 commit comments

Comments
 (0)