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:
parent
604966d9db
commit
5b277e94f1
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue