mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-20 21:38:26 +00:00
16 lines
352 B
C
16 lines
352 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "common.h"
|
|
|
|
void __attribute__((noreturn)) __fatal_error(const char *msg, const char *file, int line, const char *func) {
|
|
printf("\nFATAL ERROR:\n%s\n", msg);
|
|
if (file) {
|
|
printf("File: %s:%d\n", file, line);
|
|
}
|
|
if (func) {
|
|
printf("Func: %s\n", func);
|
|
}
|
|
exit(1);
|
|
}
|