aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/yexception.cpp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /util/generic/yexception.cpp
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/yexception.cpp')
-rw-r--r--util/generic/yexception.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/util/generic/yexception.cpp b/util/generic/yexception.cpp
index 2ce6c4369d..630aaa42e2 100644
--- a/util/generic/yexception.cpp
+++ b/util/generic/yexception.cpp
@@ -75,22 +75,22 @@ void TSystemError::Init() {
exc << TStringBuf(") ");
}
-NPrivateException::yexception::yexception() {
- ZeroTerminate();
-}
-
-TStringBuf NPrivateException::yexception::AsStrBuf() const {
- if (Buf_.Left()) {
- return TStringBuf(Buf_.Data(), Buf_.Filled());
- }
-
- return TStringBuf(Buf_.Data(), Buf_.Filled() - 1);
-}
-
-void NPrivateException::yexception::ZeroTerminate() noexcept {
- char* end = (char*)Buf_.Current();
-
- if (!Buf_.Left()) {
+NPrivateException::yexception::yexception() {
+ ZeroTerminate();
+}
+
+TStringBuf NPrivateException::yexception::AsStrBuf() const {
+ if (Buf_.Left()) {
+ return TStringBuf(Buf_.Data(), Buf_.Filled());
+ }
+
+ return TStringBuf(Buf_.Data(), Buf_.Filled() - 1);
+}
+
+void NPrivateException::yexception::ZeroTerminate() noexcept {
+ char* end = (char*)Buf_.Current();
+
+ if (!Buf_.Left()) {
--end;
}
@@ -98,11 +98,11 @@ void NPrivateException::yexception::ZeroTerminate() noexcept {
}
const char* NPrivateException::yexception::what() const noexcept {
- return Buf_.Data();
+ return Buf_.Data();
}
const TBackTrace* NPrivateException::yexception::BackTrace() const noexcept {
- return nullptr;
+ return nullptr;
}
void fputs(const std::exception& e, FILE* f) {