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:
parent
9ded8e28a6
commit
1115ac2fff
1 changed files with 4 additions and 0 deletions
|
@ -507,6 +507,8 @@ class Manager():
|
||||||
self._tick()
|
self._tick()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
raise
|
raise
|
||||||
|
except MemoryError:
|
||||||
|
self.switch(PagerApp("Your watch is low on memory.\n\nYou may want to reboot."))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Only print the exception if the watch provides a way to do so!
|
# Only print the exception if the watch provides a way to do so!
|
||||||
if 'print_exception' in dir(watch):
|
if 'print_exception' in dir(watch):
|
||||||
|
@ -523,6 +525,8 @@ class Manager():
|
||||||
self._scheduled = False
|
self._scheduled = False
|
||||||
try:
|
try:
|
||||||
self._tick()
|
self._tick()
|
||||||
|
except MemoryError:
|
||||||
|
self.switch(PagerApp("Your watch is low on memory.\n\nYou may want to reboot."))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Only print the exception if the watch provides a way to do so!
|
# Only print the exception if the watch provides a way to do so!
|
||||||
if 'print_exception' in dir(watch):
|
if 'print_exception' in dir(watch):
|
||||||
|
|
Loading…
Reference in a new issue