diff options
author | babenko <babenko@yandex-team.ru> | 2022-02-10 16:49:19 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:19 +0300 |
commit | f31097c96270919a1f49360bdaaa69ea4f3fefab (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/yt/exception/exception.h | |
parent | cec37806d8847aa3db53bafc9e251d4aaf325c12 (diff) | |
download | ydb-f31097c96270919a1f49360bdaaa69ea4f3fefab.tar.gz |
Restoring authorship annotation for <babenko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yt/exception/exception.h')
-rw-r--r-- | library/cpp/yt/exception/exception.h | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/library/cpp/yt/exception/exception.h b/library/cpp/yt/exception/exception.h index 9697c1d51f..7d35637d60 100644 --- a/library/cpp/yt/exception/exception.h +++ b/library/cpp/yt/exception/exception.h @@ -1,45 +1,45 @@ -#pragma once - -#include <util/generic/string.h> - -#include <exception> - -namespace NYT { - -//////////////////////////////////////////////////////////////////////////////// -// These are poor man's versions of NYT::TErrorException to be used in -// a limited subset of core libraries that are needed to implement NYT::TError. - -class TSimpleException - : public std::exception -{ -public: - explicit TSimpleException(TString message); - - const TString& GetMesage() const; - const char* what() const noexcept override; - -protected: - const TString Message_; -}; - -class TCompositeException - : public TSimpleException -{ -public: - explicit TCompositeException(TString message); - TCompositeException( - const std::exception& exception, - TString message); - - const std::exception_ptr& GetInnerException() const; - const char* what() const noexcept override; - -private: - const std::exception_ptr InnerException_; - const TString What_; -}; - -//////////////////////////////////////////////////////////////////////////////// - -} // namespace NYT +#pragma once + +#include <util/generic/string.h> + +#include <exception> + +namespace NYT { + +//////////////////////////////////////////////////////////////////////////////// +// These are poor man's versions of NYT::TErrorException to be used in +// a limited subset of core libraries that are needed to implement NYT::TError. + +class TSimpleException + : public std::exception +{ +public: + explicit TSimpleException(TString message); + + const TString& GetMesage() const; + const char* what() const noexcept override; + +protected: + const TString Message_; +}; + +class TCompositeException + : public TSimpleException +{ +public: + explicit TCompositeException(TString message); + TCompositeException( + const std::exception& exception, + TString message); + + const std::exception_ptr& GetInnerException() const; + const char* what() const noexcept override; + +private: + const std::exception_ptr InnerException_; + const TString What_; +}; + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT |