diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:39 +0300 |
commit | a6a92afe03e02795227d2641b49819b687f088f8 (patch) | |
tree | f6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /library/cpp/yson_pull/exceptions.cpp | |
parent | c6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff) | |
download | ydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 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 e1d68493e7..dde4df4c35 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} { -} - -const char* NYsonPull::NException::TSystemError::what() const noexcept { - return ::strerror(SavedErrno_); + : SavedErrno_{errno} { } + +const char* NYsonPull::NException::TSystemError::what() const noexcept { + return ::strerror(SavedErrno_); +} |