diff options
author | geolog <geolog@yandex-team.ru> | 2022-02-10 16:50:37 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:37 +0300 |
commit | c86baa7524ad1c8526e4487ebe0001b20bb259d4 (patch) | |
tree | 00967b15bfd1f4f03631873c99083502bf6cfe6a | |
parent | 55f877db25115ad21c92408279238bb2161ebc1d (diff) | |
download | ydb-c86baa7524ad1c8526e4487ebe0001b20bb259d4.tar.gz |
Restoring authorship annotation for <geolog@yandex-team.ru>. Commit 1 of 2.
-rw-r--r-- | library/cpp/protobuf/util/pb_io.cpp | 12 | ||||
-rw-r--r-- | library/cpp/protobuf/util/pb_io_ut.cpp | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/protobuf/util/pb_io.cpp b/library/cpp/protobuf/util/pb_io.cpp index 6270ee0624..64e16d2ace 100644 --- a/library/cpp/protobuf/util/pb_io.cpp +++ b/library/cpp/protobuf/util/pb_io.cpp @@ -144,12 +144,12 @@ void ParseFromTextFormat(IInputStream& in, NProtoBuf::Message& m, ConfigureParser(options, p); if (!p.Parse(&adaptor, &m)) { - // remove everything that may have been read - m.Clear(); - ythrow yexception() << "ParseFromTextFormat failed on Parse for " << m.GetTypeName(); - } -} - + // remove everything that may have been read + m.Clear(); + ythrow yexception() << "ParseFromTextFormat failed on Parse for " << m.GetTypeName(); + } +} + void ParseFromTextFormat(const TString& fileName, NProtoBuf::Message& m, const EParseFromTextFormatOptions options) { /* TUnbufferedFileInput is unbuffered, but TCopyingInputStreamAdaptor adds diff --git a/library/cpp/protobuf/util/pb_io_ut.cpp b/library/cpp/protobuf/util/pb_io_ut.cpp index 875d6dc602..ba4fd85c41 100644 --- a/library/cpp/protobuf/util/pb_io_ut.cpp +++ b/library/cpp/protobuf/util/pb_io_ut.cpp @@ -116,9 +116,9 @@ Y_UNIT_TEST_SUITE(TTestProtoBufIO) { } { NProtobufUtilUt::TTextTest message; - UNIT_ASSERT_EXCEPTION(ParseFromTextFormat("this_file_doesnt_exists", message), TFileError); - } - { + UNIT_ASSERT_EXCEPTION(ParseFromTextFormat("this_file_doesnt_exists", message), TFileError); + } + { NProtobufUtilUt::TTextTest message; UNIT_ASSERT_NO_EXCEPTION(ParseFromTextFormat(correctFileName, message)); } |