blob: 98d41eef2c66b8c7de87a3a81865c525b0e980f0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#pragma once
#include <concepts>
namespace NYql {
namespace NInternal {
[[noreturn]]
void DieWithCurrentException(const char* moduleName) noexcept;
} // namespace NInternal
auto WithAbortOnException(std::invocable auto action, const char* moduleName) noexcept {
try {
return action();
} catch (...) {
NInternal::DieWithCurrentException(moduleName);
}
}
} // namespace NYql
|