From b23a233b5b0d80d287f2eeca9c7f3ec26f2558a6 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Tue, 29 Apr 2025 12:25:11 -0500 Subject: [PATCH] Core: Use `__fastfail()` in MSVC error macros --- core/error/error_macros.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/error/error_macros.h b/core/error/error_macros.h index bd4ec34cde0..a15d39e03eb 100644 --- a/core/error/error_macros.h +++ b/core/error/error_macros.h @@ -34,6 +34,10 @@ #include // IWYU pragma: keep // Used in macro. We'd normally use `safe_refcount.h`, but that would cause circular includes. +#ifdef _MSC_VER +#include // `__fastfail()`. +#endif + class String; class ObjectID; @@ -85,7 +89,7 @@ void _physics_interpolation_warning(const char *p_function, const char *p_file, /** * Don't use GENERATE_TRAP() directly, should only be used be the macros below. */ -#define GENERATE_TRAP() __debugbreak() +#define GENERATE_TRAP() __fastfail(7 /* FAST_FAIL_FATAL_APP_EXIT */) #else /** * Don't use GENERATE_TRAP() directly, should only be used be the macros below.