1
0
Fork 0

wasp: Manager: Avoid printing the stack trace when it can cause problems

On nRF devices if we print with the NUS console disconnected (instead
of never connected) then things we can end up hanging. Better only
to print an exception if the watch class contains a method to do
that.
This commit is contained in:
Daniel Thompson 2020-04-18 15:32:46 +01:00
parent 604966d9db
commit 5b277e94f1

View file

@ -12,7 +12,6 @@ import gc
import machine
import watch
import widgets
import sys
from apps import *
@ -330,7 +329,9 @@ class Manager():
except KeyboardInterrupt:
raise
except Exception as e:
sys.print_exception(e)
# Only print the exception if the watch provides a way to do so!
if 'print_exception' in dir(watch):
watch.print_exception(e)
self.switch(CrashApp(e))
# Currently there is no code to control how fast the system