diff options
| author | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-12-04 12:33:43 -0500 |
|---|---|---|
| committer | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-12-04 12:33:43 -0500 |
| commit | 5b135aa861c36f399002cef1c83ba73c64bc337e (patch) | |
| tree | 0cf5ee3271dc17f4c73d5e66626bbdaf15754338 /monero_libwallet2_api_c/src/main/cpp/helpers.hpp | |
| parent | ecc31787c2174a829848aac403bd13e663fe33c3 (diff) | |
| parent | 2a38bf29618a8ce163f9d6f83b7ae86924752e32 (diff) | |
Merge branch 'develop' into zano
Diffstat (limited to 'monero_libwallet2_api_c/src/main/cpp/helpers.hpp')
| -rw-r--r-- | monero_libwallet2_api_c/src/main/cpp/helpers.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/monero_libwallet2_api_c/src/main/cpp/helpers.hpp b/monero_libwallet2_api_c/src/main/cpp/helpers.hpp index c3a64e6..2c64394 100644 --- a/monero_libwallet2_api_c/src/main/cpp/helpers.hpp +++ b/monero_libwallet2_api_c/src/main/cpp/helpers.hpp @@ -2,6 +2,24 @@ #include <string> #include <set> #include <sstream> +#include <cstdlib> + +// Debug macros +#define DEBUG_START() \ + try { + +#define DEBUG_END() \ + } catch (const std::exception &e) { \ + std::cerr << "Exception caught in function: " << __FUNCTION__ \ + << " at " << __FILE__ << ":" << __LINE__ << std::endl \ + << "Message: " << e.what() << std::endl; \ + std::abort(); \ + } catch (...) { \ + std::cerr << "Unknown exception caught in function: " << __FUNCTION__ \ + << " at " << __FILE__ << ":" << __LINE__ << std::endl; \ + std::abort(); \ + } + const char* vectorToString(const std::vector<std::string>& vec, const std::string separator); const char* vectorToString(const std::vector<uint32_t>& vec, const std::string separator); |
