Skip to content

Commit

Permalink
Fixed segfault in ThrowOnError
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazizonoki committed Jan 24, 2025
1 parent 35348ca commit db7eb1c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion include/ydb-cpp-sdk/client/types/status/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class TYdbErrorException : public TYdbException {
TYdbErrorException(TStatus status)
: Status_(std::move(status))
{
*this << status;
}

friend IOutputStream& operator<<(IOutputStream& out, const TYdbErrorException& e) {
Expand Down
1 change: 1 addition & 0 deletions src/client/types/status/status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ bool TStreamPartStatus::EOS() const {
namespace NStatusHelpers {

void ThrowOnError(TStatus status, std::function<void(TStatus)> onSuccess) {
std::cerr << "THROW ON ERROR" << std::endl;
if (!status.IsSuccess()) {
throw TYdbErrorException(status) << status;
} else {
Expand Down

0 comments on commit db7eb1c

Please sign in to comment.