fix: better warning for download error (#266)

This commit is contained in:
Talley Lambert
2024-12-14 15:29:19 -05:00
committed by GitHub
parent 34b9851b36
commit e471031f19

View File

@@ -126,9 +126,9 @@ class QIconifyIcon(QIcon):
"""
try:
path = svg_path(*key, color=color, flip=flip, rotate=rotate, dir=dir)
except OSError:
except OSError as e:
warnings.warn(
f"Unable to connect to internet, and icon {key} not cached.",
f"Error fetching icon: {e}.\nIcon {key} not cached. Using fallback.",
stacklevel=2,
)
self._draw_text_fallback(key)