2 * PROJECT: ReactOS C runtime library
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: lib/sdk/crt/abort.c
5 * PURPOSE: abort implementation
6 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
12 unsigned int __abort_behavior
= _WRITE_ABORT_MSG
| _CALL_REPORTFAULT
;
14 static const char abort_msg
[] =
15 "This application has requested the Runtime to terminate in an unusual way.\n"
16 "Please contact the applications's support team for more information.\0";
19 * \brief Aborts the program.
21 * \note The function does not return.
28 /* Check if a message should be output */
29 if (__abort_behavior
& _WRITE_ABORT_MSG
)
31 /* Check if we should display a message box */
32 if (((msvcrt_error_mode
== _OUT_TO_DEFAULT
) && (__app_type
== _GUI_APP
)) ||
33 (msvcrt_error_mode
== _OUT_TO_MSGBOX
))
35 /* Output a message box */
36 __crt_MessageBoxA(abort_msg
, MB_OK
| MB_ICONERROR
);
40 /* Print message to stderr */
41 fprintf(stderr
, "%s\n", abort_msg
);
45 /* Check if faultrep handler should be called */
46 if (__abort_behavior
& _CALL_REPORTFAULT
)
48 /// \todo unimplemented