Skip to content

Commit 3f9ea73

Browse files
committed
Add raise from for exception handling
1 parent cf6d713 commit 3f9ea73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_display_text/label.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ def text(self, new_text):
355355
current_anchored_position = self.anchored_position
356356
self._update_text(str(new_text))
357357
self.anchored_position = current_anchored_position
358-
except RuntimeError:
359-
raise RuntimeError("Text length exceeds max_glyphs")
358+
except RuntimeError as e:
359+
raise RuntimeError("Text length exceeds max_glyphs") from e
360360

361361
@property
362362
def font(self):

0 commit comments

Comments
 (0)