File tree 2 files changed +5
-3
lines changed 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,8 @@ bool start_mp(void) {
305
305
new_status_color (NAME_ERROR );
306
306
} else if (mp_obj_is_subclass_fast (result .exception_type , & mp_type_OSError )) {
307
307
new_status_color (OS_ERROR );
308
+ } else if (mp_obj_is_subclass_fast (result .exception_type , & mp_type_ValueError )) {
309
+ new_status_color (VALUE_ERROR );
308
310
} else {
309
311
new_status_color (OTHER_ERROR );
310
312
}
@@ -424,7 +426,6 @@ int main(int argc, char **argv) {
424
426
// stack so the GC can account for objects that may be referenced by the
425
427
// stack between here and where gc_collect is called.
426
428
stack_top = (char * )& stack_dummy ;
427
- reset_mp ();
428
429
429
430
// Initialise the local flash filesystem after the gc in case we need to
430
431
// grab memory from it. Create it if needed, mount in on /flash, and set it
@@ -454,9 +455,9 @@ int main(int argc, char **argv) {
454
455
if (exit_code == PYEXEC_FORCED_EXIT ) {
455
456
if (!first_run ) {
456
457
mp_hal_stdout_tx_str ("soft reboot\r\n" );
457
- reset_samd21 ();
458
- reset_mp ();
459
458
}
459
+ reset_samd21 ();
460
+ reset_mp ();
460
461
first_run = false;
461
462
skip_repl = start_mp ();
462
463
} else if (exit_code != 0 ) {
Original file line number Diff line number Diff line change 29
29
#define SYNTAX_ERROR CYAN
30
30
#define NAME_ERROR WHITE
31
31
#define OS_ERROR ORANGE
32
+ #define VALUE_ERROR PURPLE
32
33
#define OTHER_ERROR YELLOW
You can’t perform that action at this time.
0 commit comments