Improve assert patch message.

This commit is contained in:
Alejandro Cabeza Romero 2026-05-20 16:28:59 +02:00
parent 297c7c59ee
commit 52ffd46c3f
No known key found for this signature in database
GPG Key ID: DA3D14AE478030FD

View File

@ -22,4 +22,6 @@
#include_next <assert.h>
#undef assert
#include <stdexcept>
#define assert(cond) ((cond) ? void(0) : throw std::runtime_error("Failed assert: " #cond))
#define assert(cond) \
((cond) ? void(0) : throw std::runtime_error( \
std::string("Circuit constraint violated in ") + __FILE__ + ":" + std::to_string(__LINE__) + ": " + #cond))