diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-04-02 01:14:13 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-04-02 01:14:13 +0300 |
commit | 6754a6a379c0522676071b52818018c46b0a8e58 (patch) | |
tree | 7106cb31d3cd22eb6a7bb4bbde47ae23cd9f4027 | |
parent | 24e1d4fe6d126ac368719f6a98bb4192739adb05 (diff) | |
download | ydb-6754a6a379c0522676071b52818018c46b0a8e58.tar.gz |
intermediate changes
ref:4f6264c5be27540a15fdefdc0e4084f35b9f7f44
-rw-r--r-- | build/rules/autocheck.blacklist | 12 | ||||
-rw-r--r-- | build/ya.conf.json | 2 | ||||
-rw-r--r-- | library/cpp/ipv6_address/ipv6_address.cpp | 5 | ||||
-rw-r--r-- | library/cpp/ipv6_address/ipv6_address.h | 1 | ||||
-rw-r--r-- | library/cpp/threading/future/core/future-inl.h | 30 | ||||
-rw-r--r-- | library/cpp/threading/future/core/future.cpp | 6 |
6 files changed, 41 insertions, 15 deletions
diff --git a/build/rules/autocheck.blacklist b/build/rules/autocheck.blacklist index 0956c15252..3e4be95a4a 100644 --- a/build/rules/autocheck.blacklist +++ b/build/rules/autocheck.blacklist @@ -232,3 +232,15 @@ search-interfaces/pic-bot mds/admin/packages/yandex-storage-yasm-system-stat search-interfaces/video-top taxi/github/frontend-monorepo +mds/admin/packages/yandex-storage-yasm-mastermind-stat +mds/admin/packages/yandex-storage-yasm-elliptics-stat +classifieds/infra/yt-exporters +search-interfaces/yandex-apps-api +search-interfaces/fiji-deverrors-bot +mds/admin/packages/yandex-storage-mds-autoadmin +mds/admin/packages/yandex-storage-shelf-hw-watcher-conf +mds/admin/packages/yandex-storage-sa-scripts +afisha/infra/projects/gh_monitorings +data-ui/forms +velocity/error-booster/error-booster-monitoring-config +velocity/error-booster/packages/st-client diff --git a/build/ya.conf.json b/build/ya.conf.json index ecbb63c4d7..d4a2d4eb8d 100644 --- a/build/ya.conf.json +++ b/build/ya.conf.json @@ -7877,7 +7877,7 @@ }, "saas2": { "formula": { - "sandbox_id": 1229425647, + "sandbox_id": 1263907474, "match": "saas2" }, "executable": { diff --git a/library/cpp/ipv6_address/ipv6_address.cpp b/library/cpp/ipv6_address/ipv6_address.cpp index be8fcbae13..b23534b74f 100644 --- a/library/cpp/ipv6_address/ipv6_address.cpp +++ b/library/cpp/ipv6_address/ipv6_address.cpp @@ -110,6 +110,11 @@ TIpv6Address TIpv6Address::FromString(TStringBuf str, bool& ok) noexcept { } } +TIpv6Address TIpv6Address::FromString(TStringBuf str) noexcept { + bool ok = false; + return TIpv6Address::FromString(str, ok); +} + TString TIpv6Address::ToString(bool* ok) const noexcept { return ToString(true, ok); } diff --git a/library/cpp/ipv6_address/ipv6_address.h b/library/cpp/ipv6_address/ipv6_address.h index 1d7eb0b65f..a6ca43a843 100644 --- a/library/cpp/ipv6_address/ipv6_address.h +++ b/library/cpp/ipv6_address/ipv6_address.h @@ -61,6 +61,7 @@ public: explicit TIpv6Address(const in_addr& addr); static TIpv6Address FromString(TStringBuf srcStr, bool& ok) noexcept; + static TIpv6Address FromString(TStringBuf str) noexcept; constexpr bool IsNull() const noexcept { return Ip == 0; diff --git a/library/cpp/threading/future/core/future-inl.h b/library/cpp/threading/future/core/future-inl.h index 5fd4296a93..d04fd54e29 100644 --- a/library/cpp/threading/future/core/future-inl.h +++ b/library/cpp/threading/future/core/future-inl.h @@ -16,6 +16,8 @@ namespace NThreading { //////////////////////////////////////////////////////////////////////////////// + [[noreturn]] void ThrowFutureException(TStringBuf message, const TSourceLocation& source); + enum class TError { Error }; @@ -48,11 +50,11 @@ namespace NThreading { int state = AtomicGet(State); if (Y_UNLIKELY(state == NotReady)) { if (timeout == TDuration::Zero()) { - ythrow TFutureException() << "value not set"; + ::NThreading::NImpl::ThrowFutureException("value not set"sv, __LOCATION__); } if (!Wait(timeout)) { - ythrow TFutureException() << "wait timeout"; + ::NThreading::NImpl::ThrowFutureException("wait timeout"sv, __LOCATION__); } state = AtomicGet(State); @@ -65,11 +67,11 @@ namespace NThreading { break; case ValueRead: if (acquireState != ValueRead) { - ythrow TFutureException() << "value being read"; + ::NThreading::NImpl::ThrowFutureException("value being read"sv, __LOCATION__); } break; case ValueMoved: - ythrow TFutureException() << "value was moved"; + ::NThreading::NImpl::ThrowFutureException("value was moved"sv, __LOCATION__); default: Y_ASSERT(state == ValueSet); } @@ -129,7 +131,7 @@ namespace NThreading { void SetValue(TT&& value) { bool success = TrySetValue(std::forward<TT>(value)); if (Y_UNLIKELY(!success)) { - ythrow TFutureException() << "value already set"; + ::NThreading::NImpl::ThrowFutureException("value already set"sv, __LOCATION__); } } @@ -169,7 +171,7 @@ namespace NThreading { void SetException(std::exception_ptr e) { bool success = TrySetException(std::move(e)); if (Y_UNLIKELY(!success)) { - ythrow TFutureException() << "value already set"; + ::NThreading::NImpl::ThrowFutureException("value already set"sv, __LOCATION__); } } @@ -300,11 +302,11 @@ namespace NThreading { int state = AtomicGet(State); if (Y_UNLIKELY(state == NotReady)) { if (timeout == TDuration::Zero()) { - ythrow TFutureException() << "value not set"; + ::NThreading::NImpl::ThrowFutureException("value not set"sv, __LOCATION__); } if (!Wait(timeout)) { - ythrow TFutureException() << "wait timeout"; + ::NThreading::NImpl::ThrowFutureException("wait timeout"sv, __LOCATION__); } state = AtomicGet(State); @@ -318,7 +320,7 @@ namespace NThreading { void SetValue() { bool success = TrySetValue(); if (Y_UNLIKELY(!success)) { - ythrow TFutureException() << "value already set"; + ::NThreading::NImpl::ThrowFutureException("value already set"sv, __LOCATION__); } } @@ -355,7 +357,7 @@ namespace NThreading { void SetException(std::exception_ptr e) { bool success = TrySetException(std::move(e)); if (Y_UNLIKELY(!success)) { - ythrow TFutureException() << "value already set"; + ::NThreading::NImpl::ThrowFutureException("value already set"sv, __LOCATION__); } } @@ -649,7 +651,7 @@ namespace NThreading { template <typename T> inline void TFuture<T>::EnsureInitialized() const { if (!State) { - ythrow TFutureException() << "state not initialized"; + ::NThreading::NImpl::ThrowFutureException("state not initialized"sv, __LOCATION__); } } @@ -751,7 +753,7 @@ namespace NThreading { inline void TFuture<void>::EnsureInitialized() const { if (!State) { - ythrow TFutureException() << "state not initialized"; + ::NThreading::NImpl::ThrowFutureException("state not initialized"sv, __LOCATION__); } } @@ -858,7 +860,7 @@ namespace NThreading { template <typename T> inline void TPromise<T>::EnsureInitialized() const { if (!State) { - ythrow TFutureException() << "state not initialized"; + ::NThreading::NImpl::ThrowFutureException("state not initialized"sv, __LOCATION__); } } @@ -932,7 +934,7 @@ namespace NThreading { inline void TPromise<void>::EnsureInitialized() const { if (!State) { - ythrow TFutureException() << "state not initialized"; + ::NThreading::NImpl::ThrowFutureException("state not initialized"sv, __LOCATION__); } } diff --git a/library/cpp/threading/future/core/future.cpp b/library/cpp/threading/future/core/future.cpp index 3243afcb40..809369d843 100644 --- a/library/cpp/threading/future/core/future.cpp +++ b/library/cpp/threading/future/core/future.cpp @@ -1 +1,7 @@ #include "future.h" + +namespace NThreading::NImpl { + [[noreturn]] void ThrowFutureException(TStringBuf message, const TSourceLocation& source) { + throw source + TFutureException() << message; + } +} |