1
0
Fork 0

MemoryError exception now shows custom message instead of CrashApp.

Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com>
This commit is contained in:
Tait Berlette 2021-03-31 15:24:34 -04:00 committed by Daniel Thompson
parent 9ded8e28a6
commit 1115ac2fff

View file

@ -507,6 +507,8 @@ class Manager():
self._tick()
except KeyboardInterrupt:
raise
except MemoryError:
self.switch(PagerApp("Your watch is low on memory.\n\nYou may want to reboot."))
except Exception as e:
# Only print the exception if the watch provides a way to do so!
if 'print_exception' in dir(watch):
@ -523,6 +525,8 @@ class Manager():
self._scheduled = False
try:
self._tick()
except MemoryError:
self.switch(PagerApp("Your watch is low on memory.\n\nYou may want to reboot."))
except Exception as e:
# Only print the exception if the watch provides a way to do so!
if 'print_exception' in dir(watch):