diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:40 +0300 |
commit | 5d50718e66d9c037dc587a0211110b7d25a66185 (patch) | |
tree | e98df59de24d2ef7c77baed9f41e4875a2fef972 /library/cpp/yson_pull/exceptions.cpp | |
parent | a6a92afe03e02795227d2641b49819b687f088f8 (diff) | |
download | ydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yson_pull/exceptions.cpp')
-rw-r--r-- | library/cpp/yson_pull/exceptions.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/library/cpp/yson_pull/exceptions.cpp b/library/cpp/yson_pull/exceptions.cpp index dde4df4c35..e1d68493e7 100644 --- a/library/cpp/yson_pull/exceptions.cpp +++ b/library/cpp/yson_pull/exceptions.cpp @@ -1,45 +1,45 @@ -#include "exceptions.h" - -#include <util/string/builder.h> - -#include <cerrno> -#include <cstring> - -using namespace NYsonPull::NException; - -const char* TBadStream::what() const noexcept { - TStringBuilder stream; - stream << "Invalid YSON"; - if (Position_.Offset || Position_.Line || Position_.Column) { - bool first = true; - stream << " at "; - if (Position_.Offset) { - stream << "offset " << *Position_.Offset; - first = false; - } - if (Position_.Line) { - if (!first) { - stream << ", "; - } - stream << "line " << *Position_.Line; - first = false; - } - if (Position_.Column) { - if (!first) { - stream << ", "; - } - stream << "column " << *Position_.Column; - } - } - stream << ": " << Message_; - FormattedMessage_ = stream; - return FormattedMessage_.c_str(); -} - +#include "exceptions.h" + +#include <util/string/builder.h> + +#include <cerrno> +#include <cstring> + +using namespace NYsonPull::NException; + +const char* TBadStream::what() const noexcept { + TStringBuilder stream; + stream << "Invalid YSON"; + if (Position_.Offset || Position_.Line || Position_.Column) { + bool first = true; + stream << " at "; + if (Position_.Offset) { + stream << "offset " << *Position_.Offset; + first = false; + } + if (Position_.Line) { + if (!first) { + stream << ", "; + } + stream << "line " << *Position_.Line; + first = false; + } + if (Position_.Column) { + if (!first) { + stream << ", "; + } + stream << "column " << *Position_.Column; + } + } + stream << ": " << Message_; + FormattedMessage_ = stream; + return FormattedMessage_.c_str(); +} + NYsonPull::NException::TSystemError::TSystemError() - : SavedErrno_{errno} { + : SavedErrno_{errno} { +} + +const char* NYsonPull::NException::TSystemError::what() const noexcept { + return ::strerror(SavedErrno_); } - -const char* NYsonPull::NException::TSystemError::what() const noexcept { - return ::strerror(SavedErrno_); -} |