Skip to content

Commit e161778

Browse files
committed
Simplify and always use exception pointers when we're using a back-end that supports it
1 parent 78ce006 commit e161778

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/from_current.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,8 @@ namespace detail {
4040
#if defined(_MSC_VER) && defined(CPPTRACE_UNWIND_WITH_EXCEPTION_POINTERS)
4141
CPPTRACE_FORCE_NO_INLINE void collect_current_trace(std::size_t skip, EXCEPTION_POINTERS* exception_ptrs) {
4242
try {
43-
#if defined(_M_IX86) || defined(__i386__)
44-
(void)skip; // don't skip any frames, the context record is at the throw point
45-
auto trace = raw_trace{detail::capture_frames(0, SIZE_MAX, exception_ptrs)};
46-
#else
47-
(void)exception_ptrs;
48-
auto trace = raw_trace{detail::capture_frames(skip + 1, SIZE_MAX)};
49-
#endif
43+
(void)skip; // don't skip any frames, the context record is at the throw point
44+
auto trace = raw_trace{detail::capture_frames(0, SIZE_MAX, exception_ptrs)};
5045
save_current_trace(std::move(trace));
5146
} catch(...) {
5247
detail::log_and_maybe_propagate_exception(std::current_exception());

0 commit comments

Comments
 (0)