Skip to content

Commit

Permalink
show assert info
Browse files Browse the repository at this point in the history
  • Loading branch information
wheybags committed Jul 13, 2024
1 parent 1216a89 commit 003d26a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion EmperorHooks/Error.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#pragma once

#define release_assert(X) if (!(X)) do { MessageBoxA(nullptr, "assert failed", "assert failed", 0); abort(); } while (0)
#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)

0 comments on commit 003d26a

Please sign in to comment.