Skip to content

Commit 1e4b651

Browse files
authored
Fixed segfault in ThrowOnError (#368)
1 parent 35348ca commit 1e4b651

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

include/ydb-cpp-sdk/client/types/status/status.h

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class TYdbErrorException : public TYdbException {
5555
TYdbErrorException(TStatus status)
5656
: Status_(std::move(status))
5757
{
58-
*this << status;
5958
}
6059

6160
friend IOutputStream& operator<<(IOutputStream& out, const TYdbErrorException& e) {

src/client/types/status/status.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ bool TStreamPartStatus::EOS() const {
104104
namespace NStatusHelpers {
105105

106106
void ThrowOnError(TStatus status, std::function<void(TStatus)> onSuccess) {
107+
std::cerr << "THROW ON ERROR" << std::endl;
107108
if (!status.IsSuccess()) {
108109
throw TYdbErrorException(status) << status;
109110
} else {

0 commit comments

Comments
 (0)