summaryrefslogtreecommitdiffstats
path: root/util/generic/yexception.cpp
diff options
context:
space:
mode:
authortrenin17 <[email protected]>2022-02-10 16:51:09 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:51:09 +0300
commit7d9e9dd650ccaad923d6b1ce79baaa3a15b740ae (patch)
tree9c42d6cb3c90f951425e1d63ce484ad67e0936e7 /util/generic/yexception.cpp
parent9a82582baef5f5fc12d0448b66bdb6576fbb1dd2 (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/generic/yexception.cpp')
-rw-r--r--util/generic/yexception.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/util/generic/yexception.cpp b/util/generic/yexception.cpp
index 2ce6c4369da..8cc8ed250b9 100644
--- a/util/generic/yexception.cpp
+++ b/util/generic/yexception.cpp
@@ -4,8 +4,8 @@
#include <util/system/backtrace.h>
#include <util/system/type_name.h>
-#include <cxxabi.h>
-
+#include <cxxabi.h>
+
#include <stdexcept>
#include <cstdio>
@@ -47,26 +47,26 @@ bool UncaughtException() noexcept {
#endif
}
-std::string CurrentExceptionTypeName() {
-#if defined(_linux_) || defined(_darwin_)
- std::type_info* currentExceptionTypePtr = abi::__cxa_current_exception_type();
- if (currentExceptionTypePtr) {
- return TypeName(*currentExceptionTypePtr);
- }
-#endif
- //There is no abi::__cxa_current_exception_type() on Windows.
- //Emulated it with rethrow - catch construction.
- std::exception_ptr currentException = std::current_exception();
- Y_ASSERT(currentException != nullptr);
- try {
- std::rethrow_exception(currentException);
- } catch (const std::exception& e) {
- return TypeName(typeid(e));
- } catch (...) {
- return "unknown type";
- }
-}
-
+std::string CurrentExceptionTypeName() {
+#if defined(_linux_) || defined(_darwin_)
+ std::type_info* currentExceptionTypePtr = abi::__cxa_current_exception_type();
+ if (currentExceptionTypePtr) {
+ return TypeName(*currentExceptionTypePtr);
+ }
+#endif
+ //There is no abi::__cxa_current_exception_type() on Windows.
+ //Emulated it with rethrow - catch construction.
+ std::exception_ptr currentException = std::current_exception();
+ Y_ASSERT(currentException != nullptr);
+ try {
+ std::rethrow_exception(currentException);
+ } catch (const std::exception& e) {
+ return TypeName(typeid(e));
+ } catch (...) {
+ return "unknown type";
+ }
+}
+
void TSystemError::Init() {
yexception& exc = *this;