File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 2020#include <platform_config.h>
2121#include <screen.h>
2222#include <usb/usb.h>
23- #ifndef TESTING
2423
24+ #if defined(TESTING )
25+ #include <stdio.h>
26+ #include <stdlib.h>
27+ #endif
28+
29+ #ifndef TESTING
2530void HardFault_Handler (void )
2631{
2732 Abort ("Unexpected error.\nPlease contact support." );
@@ -35,20 +40,23 @@ void MemManage_Handler(void)
3540
3641void Abort (const char * msg )
3742{
43+ #if defined(TESTING )
44+ fprintf (stderr , "%s\n" , msg );
45+ exit (1 );
46+ #else
3847 util_log ("%s" , msg );
3948 screen_print_debug (msg , 0 );
4049 usb_stop ();
41- #if !defined(TESTING )
4250#if defined(BOOTLOADER )
4351 bootloader_close_interfaces ();
4452#else
4553 system_close_interfaces ();
46- #endif
4754#endif
4855 // Break the program if we are debugging
4956 ASSERT (false);
5057 while (1 ) {
5158 }
59+ #endif
5260}
5361
5462void AbortAutoenter (const char * msg )
You can’t perform that action at this time.
0 commit comments