diff --git a/EmperorHooks/Error.hpp b/EmperorHooks/Error.hpp index 313911c..1f309e3 100644 --- a/EmperorHooks/Error.hpp +++ b/EmperorHooks/Error.hpp @@ -1,3 +1,6 @@ #pragma once -#define release_assert(X) if (!(X)) do { MessageBoxA(nullptr, "assert failed", "assert failed", 0); abort(); } while (0) \ No newline at end of file +#define RASSERT_STRINGIFY(X) #X +#define RASSERT_STRINGIFY_2(X) RASSERT_STRINGIFY(X) + +#define release_assert(X) if (!(X)) do { MessageBoxA(nullptr, "assert failed: " RASSERT_STRINGIFY(X) " at " __FILE__ ":" RASSERT_STRINGIFY_2(__LINE__), "assert failed", 0); abort(); } while (0) \ No newline at end of file