summaryrefslogtreecommitdiff
path: root/wasp/boards
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-04-11 19:14:30 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-04-11 19:15:02 (GMT)
commitf68eb610c5d77bb71d3952e0dc9ca70a472ebfae (patch)
treeca0b7a1174dc7e7013ce5e67fc18231d1d6ea0c3 /wasp/boards
parent8cf9369efa9083cccee36e7596d52e12ace362d3 (diff)
wasp: On-device crash reporting
If an application crashes let's report it on the device so it can be distinguished from a hang (if nothing else it should mean we get better bug reports).
Diffstat (limited to 'wasp/boards')
-rw-r--r--wasp/boards/pinetime/manifest.py1
-rw-r--r--wasp/boards/simulator/watch.py6
2 files changed, 7 insertions, 0 deletions
diff --git a/wasp/boards/pinetime/manifest.py b/wasp/boards/pinetime/manifest.py
index 3d8cd9a..d22f360 100644
--- a/wasp/boards/pinetime/manifest.py
+++ b/wasp/boards/pinetime/manifest.py
@@ -7,6 +7,7 @@ freeze('../..',
'apps/clock.py',
'apps/flashlight.py',
'apps/launcher.py',
+ 'apps/pager.py',
'apps/settings.py',
'apps/testapp.py',
'boot.py',
diff --git a/wasp/boards/simulator/watch.py b/wasp/boards/simulator/watch.py
index ce281f4..178b1eb 100644
--- a/wasp/boards/simulator/watch.py
+++ b/wasp/boards/simulator/watch.py
@@ -6,6 +6,12 @@ def sleep_ms(ms):
time.sleep(ms / 1000)
time.sleep_ms = sleep_ms
+import sys, traceback
+def print_exception(exc, file=sys.stdout):
+ exc_type, exc_value, exc_traceback = sys.exc_info()
+ traceback.print_exception(exc_type, exc_value, exc_traceback, file=file)
+sys.print_exception = print_exception
+
import draw565
from machine import I2C