diff options
author | Devtools Arcadia <arcadia-devtools@yandex-team.ru> | 2022-02-07 18:08:42 +0300 |
---|---|---|
committer | Devtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net> | 2022-02-07 18:08:42 +0300 |
commit | 1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch) | |
tree | e26c9fed0de5d9873cce7e00bc214573dc2195b7 /library/cpp/monlib/exception | |
download | ydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'library/cpp/monlib/exception')
-rw-r--r-- | library/cpp/monlib/exception/exception.cpp | 1 | ||||
-rw-r--r-- | library/cpp/monlib/exception/exception.h | 13 | ||||
-rw-r--r-- | library/cpp/monlib/exception/ya.make | 12 |
3 files changed, 26 insertions, 0 deletions
diff --git a/library/cpp/monlib/exception/exception.cpp b/library/cpp/monlib/exception/exception.cpp new file mode 100644 index 00000000000..5a8d53ceb04 --- /dev/null +++ b/library/cpp/monlib/exception/exception.cpp @@ -0,0 +1 @@ +#include "exception.h" diff --git a/library/cpp/monlib/exception/exception.h b/library/cpp/monlib/exception/exception.h new file mode 100644 index 00000000000..027c22b27df --- /dev/null +++ b/library/cpp/monlib/exception/exception.h @@ -0,0 +1,13 @@ +#pragma once + + +namespace NMonitoring { + +#define MONLIB_ENSURE_EX(CONDITION, THROW_EXPRESSION) \ + do { \ + if (Y_UNLIKELY(!(CONDITION))) { \ + throw THROW_EXPRESSION; \ + } \ + } while (false) + +} // namespace NSolomon diff --git a/library/cpp/monlib/exception/ya.make b/library/cpp/monlib/exception/ya.make new file mode 100644 index 00000000000..78660711d37 --- /dev/null +++ b/library/cpp/monlib/exception/ya.make @@ -0,0 +1,12 @@ +LIBRARY() + +OWNER(g:solomon) + +SRCS( + exception.cpp +) + +PEERDIR( +) + +END() |