diff --git a/core/embed/lib/error_handling.c b/core/embed/lib/error_handling.c index 6d9361e475..f93636c058 100644 --- a/core/embed/lib/error_handling.c +++ b/core/embed/lib/error_handling.c @@ -18,6 +18,9 @@ */ #include +#ifdef TREZOR_EMULATOR +#include +#endif #include "common.h" #include "display.h" @@ -65,6 +68,13 @@ void __attribute__((noreturn)) error_shutdown(const char *message) { void __attribute__((noreturn)) __fatal_error(const char *msg, const char *file, int line) { +#ifdef TREZOR_EMULATOR + fprintf(stderr, "FATAL ERROR: %s\n", msg); + if (file) { + fprintf(stderr, "file: %s:%d\n", file, line); + } + fflush(stderr); +#endif #ifdef FANCY_FATAL_ERROR if (msg == NULL) { char buf[128] = {0};