We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30a0f87 commit e36fb50Copy full SHA for e36fb50
util/generic/yexception_ut.cpp
@@ -11,6 +11,7 @@ static inline void Throw2DontMove() {
11
#include <library/cpp/testing/unittest/registar.h>
12
13
#include <util/generic/algorithm.h>
14
+#include <util/generic/scope.h>
15
#include <util/memory/tempbuf.h>
16
#include <util/random/mersenne.h>
17
#include <util/stream/output.h>
@@ -159,7 +160,10 @@ class TExceptionTest: public TTestBase {
159
160
auto invalidFormatter = [](IOutputStream*, void* const*, size_t) {
161
Throw2DontMove();
162
};
- SetFormatBackTraceFn(invalidFormatter);
163
+ TFormatBackTraceFn prevFn = SetFormatBackTraceFn(invalidFormatter);
164
+ Y_DEFER {
165
+ SetFormatBackTraceFn(prevFn);
166
+ };
167
168
try {
169
Throw1DontMove();
0 commit comments