diff options
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); |
