patch 8.2.4317: MS-Windows: Vim exits when Python 3 initialisation fails
Problem: MS-Windows: Vim exits when Python 3 initialisation fails.
Solution: Hook into the exit() function to recover from the failure.
(Ken Takata, closes #9710)
diff --git a/src/errors.h b/src/errors.h
index 80a9a5a..53bd0cd 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -3224,3 +3224,7 @@
EXTERN char e_cannot_use_partial_here[]
INIT(= N_("E1265: Cannot use a partial here"));
#endif
+#if defined(FEAT_PYTHON3) && defined(MSWIN)
+EXTERN char e_critical_error_in_python3_initialization_check_your_installation[]
+ INIT(= N_("E1266: Critical error in python3 initialization, check your python3 installation"));
+#endif