Skip to content

Commit b23a233

Browse files
committed
Core: Use __fastfail() in MSVC error macros
1 parent b1b873a commit b23a233

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/error/error_macros.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434

3535
#include <atomic> // IWYU pragma: keep // Used in macro. We'd normally use `safe_refcount.h`, but that would cause circular includes.
3636

37+
#ifdef _MSC_VER
38+
#include <intrin.h> // `__fastfail()`.
39+
#endif
40+
3741
class String;
3842
class ObjectID;
3943

@@ -85,7 +89,7 @@ void _physics_interpolation_warning(const char *p_function, const char *p_file,
8589
/**
8690
* Don't use GENERATE_TRAP() directly, should only be used be the macros below.
8791
*/
88-
#define GENERATE_TRAP() __debugbreak()
92+
#define GENERATE_TRAP() __fastfail(7 /* FAST_FAIL_FATAL_APP_EXIT */)
8993
#else
9094
/**
9195
* Don't use GENERATE_TRAP() directly, should only be used be the macros below.

0 commit comments

Comments
 (0)