aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorsavin97 <savin97@yandex-team.ru>2022-02-10 16:52:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:52:08 +0300
commitbd038e90fb042b0ec259494b0b5530c1527289f2 (patch)
treeab7fbbf3253d4c0e2793218f09378908beb025fb /util
parent6dda96acccc5db795315421605ba0451b8d41b16 (diff)
downloadydb-bd038e90fb042b0ec259494b0b5530c1527289f2.tar.gz
Restoring authorship annotation for <savin97@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util')
-rw-r--r--util/generic/yexception.cpp2
-rw-r--r--util/generic/yexception.h26
-rw-r--r--util/generic/yexception_ut.cpp48
3 files changed, 38 insertions, 38 deletions
diff --git a/util/generic/yexception.cpp b/util/generic/yexception.cpp
index 12eb7b2fa4..2ce6c4369d 100644
--- a/util/generic/yexception.cpp
+++ b/util/generic/yexception.cpp
@@ -71,7 +71,7 @@ void TSystemError::Init() {
yexception& exc = *this;
exc << TStringBuf("(");
- exc << TStringBuf(LastSystemErrorText(Status_));
+ exc << TStringBuf(LastSystemErrorText(Status_));
exc << TStringBuf(") ");
}
diff --git a/util/generic/yexception.h b/util/generic/yexception.h
index 3c106d790d..b0c604e8c4 100644
--- a/util/generic/yexception.h
+++ b/util/generic/yexception.h
@@ -86,34 +86,34 @@ Y_DECLARE_OUT_SPEC(inline, yexception, stream, value) {
stream << value.AsStrBuf();
}
-class TSystemError: public yexception {
+class TSystemError: public yexception {
public:
- TSystemError(int status)
- : Status_(status)
+ TSystemError(int status)
+ : Status_(status)
{
Init();
}
- TSystemError()
- : TSystemError(LastSystemError())
+ TSystemError()
+ : TSystemError(LastSystemError())
{
}
-
- int Status() const noexcept {
- return Status_;
+
+ int Status() const noexcept {
+ return Status_;
}
private:
void Init();
-
-private:
- int Status_;
+
+private:
+ int Status_;
};
-class TIoException: public TSystemError {
+class TIoException: public TSystemError {
};
-class TIoSystemError: public TIoException {
+class TIoSystemError: public TIoException {
};
class TFileError: public TIoSystemError {
diff --git a/util/generic/yexception_ut.cpp b/util/generic/yexception_ut.cpp
index 7f243f751b..cb3e29fed8 100644
--- a/util/generic/yexception_ut.cpp
+++ b/util/generic/yexception_ut.cpp
@@ -51,7 +51,7 @@ class TExceptionTest: public TTestBase {
UNIT_TEST(TestRethrowAppend)
UNIT_TEST(TestMacroOverload)
UNIT_TEST(TestMessageCrop)
- UNIT_TEST(TestTIoSystemErrorSpecialMethods)
+ UNIT_TEST(TestTIoSystemErrorSpecialMethods)
UNIT_TEST(TestCurrentExceptionTypeNameMethod)
UNIT_TEST_SUITE_END();
@@ -296,29 +296,29 @@ private:
UNIT_ASSERT_EQUAL(e.AsStrBuf(), s.substr(0, tmp.Size() - 1));
}
}
-
- void TestTIoSystemErrorSpecialMethods() {
- TString testStr{"systemError"};
- TIoSystemError err;
- err << testStr;
- UNIT_ASSERT(err.AsStrBuf().Contains(testStr));
-
- TIoSystemError errCopy{err};
- UNIT_ASSERT(err.AsStrBuf().Contains(testStr));
- UNIT_ASSERT(errCopy.AsStrBuf().Contains(testStr));
-
- TIoSystemError errAssign;
- errAssign = err;
- UNIT_ASSERT(err.AsStrBuf().Contains(testStr));
- UNIT_ASSERT(errAssign.AsStrBuf().Contains(testStr));
-
- TIoSystemError errMove{std::move(errCopy)};
- UNIT_ASSERT(errMove.AsStrBuf().Contains(testStr));
-
- TIoSystemError errMoveAssign;
- errMoveAssign = std::move(errMove);
- UNIT_ASSERT(errMoveAssign.AsStrBuf().Contains(testStr));
- }
+
+ void TestTIoSystemErrorSpecialMethods() {
+ TString testStr{"systemError"};
+ TIoSystemError err;
+ err << testStr;
+ UNIT_ASSERT(err.AsStrBuf().Contains(testStr));
+
+ TIoSystemError errCopy{err};
+ UNIT_ASSERT(err.AsStrBuf().Contains(testStr));
+ UNIT_ASSERT(errCopy.AsStrBuf().Contains(testStr));
+
+ TIoSystemError errAssign;
+ errAssign = err;
+ UNIT_ASSERT(err.AsStrBuf().Contains(testStr));
+ UNIT_ASSERT(errAssign.AsStrBuf().Contains(testStr));
+
+ TIoSystemError errMove{std::move(errCopy)};
+ UNIT_ASSERT(errMove.AsStrBuf().Contains(testStr));
+
+ TIoSystemError errMoveAssign;
+ errMoveAssign = std::move(errMove);
+ UNIT_ASSERT(errMoveAssign.AsStrBuf().Contains(testStr));
+ }
inline void TestCurrentExceptionTypeNameMethod() {
//Basic test of getting the correct exception type name.
try {