File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 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) {
305305 new_status_color (NAME_ERROR );
306306 } else if (mp_obj_is_subclass_fast (result .exception_type , & mp_type_OSError )) {
307307 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 );
308310 } else {
309311 new_status_color (OTHER_ERROR );
310312 }
@@ -424,7 +426,6 @@ int main(int argc, char **argv) {
424426 // stack so the GC can account for objects that may be referenced by the
425427 // stack between here and where gc_collect is called.
426428 stack_top = (char * )& stack_dummy ;
427- reset_mp ();
428429
429430 // Initialise the local flash filesystem after the gc in case we need to
430431 // 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) {
454455 if (exit_code == PYEXEC_FORCED_EXIT ) {
455456 if (!first_run ) {
456457 mp_hal_stdout_tx_str ("soft reboot\r\n" );
457- reset_samd21 ();
458- reset_mp ();
459458 }
459+ reset_samd21 ();
460+ reset_mp ();
460461 first_run = false;
461462 skip_repl = start_mp ();
462463 } else if (exit_code != 0 ) {
Original file line number Diff line number Diff line change 2929#define SYNTAX_ERROR CYAN
3030#define NAME_ERROR WHITE
3131#define OS_ERROR ORANGE
32+ #define VALUE_ERROR PURPLE
3233#define OTHER_ERROR YELLOW
You can’t perform that action at this time.
0 commit comments