From 1115ac2fff0057df93ea8a6ccdb93102cec0c465 Mon Sep 17 00:00:00 2001 From: Tait Berlette <54515877+taitberlette@users.noreply.github.com> Date: Wed, 31 Mar 2021 15:24:34 -0400 Subject: [PATCH] MemoryError exception now shows custom message instead of CrashApp. Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com> --- wasp/wasp.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wasp/wasp.py b/wasp/wasp.py index 5b1a8b8..6c3e4ef 100644 --- a/wasp/wasp.py +++ b/wasp/wasp.py @@ -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):