Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable stack tracing in the case of debug builds. #1613

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions include/bitcoin/system/have.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,6 @@
/// Disable to unsuppress warnings.
#define HAVE_SUPPRESSION

/// Disable noexcept to capture stack trace.
////#define HAVE_NOEXCEPT

/// Disable to emit all suppressed warnings.
#define HAVE_WARNINGS

Expand Down
17 changes: 8 additions & 9 deletions include/bitcoin/system/preprocessor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@
#define BC_DEBUG_ONLY(expression) expression
#endif

#if defined(NDEBUG)
#define NOEXCEPT
#define THROWS
#else
#define NOEXCEPT noexcept
#define THROWS noexcept(false)
#endif

/// Messages.
/// ---------------------------------------------------------------------------

Expand Down Expand Up @@ -189,15 +197,6 @@
/// Workarounds for C++ noncompliance.
/// ---------------------------------------------------------------------------

/// C++11 (full)
#if defined(HAVE_NOEXCEPT)
#define NOEXCEPT noexcept
#define THROWS noexcept(false)
#else
#define NOEXCEPT
#define THROWS
#endif

/// C++14 (full)
#if defined(HAVE_DEPRECATED)
#define DEPRECATED [[deprecated]]
Expand Down
Loading