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 | e0c1c9c8c8093d4093991068a2120f71b79bc35b (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library | |
parent | c86baa7524ad1c8526e4487ebe0001b20bb259d4 (diff) | |
download | ydb-e0c1c9c8c8093d4093991068a2120f71b79bc35b.tar.gz |
Restoring authorship annotation for <geolog@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library')
-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 64e16d2ace..6270ee0624 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 ba4fd85c41..875d6dc602 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)); } |