We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ed7b7f commit 717a958Copy full SHA for 717a958
1 file changed
unix/main.c
@@ -73,6 +73,13 @@ STATIC void sighandler(int signum) {
73
}
74
#endif
75
76
+STATIC void stderr_print_strn(void *env, const char *str, mp_uint_t len) {
77
+ (void)env;
78
+ fwrite(str, len, 1, stderr);
79
+}
80
+
81
+const mp_print_t mp_stderr_print = {NULL, stderr_print_strn};
82
83
#define FORCED_EXIT (0x100)
84
// If exc is SystemExit, return value where FORCED_EXIT bit set,
85
// and lower 8 bits are SystemExit value. For all other exceptions,
@@ -90,7 +97,7 @@ STATIC int handle_uncaught_exception(mp_obj_t exc) {
90
97
91
98
92
99
// Report all other exceptions
93
- mp_obj_print_exception(&mp_plat_print, exc);
100
+ mp_obj_print_exception(&mp_stderr_print, exc);
94
101
return 1;
95
102
96
103
0 commit comments