Skip to content

Commit

Permalink
fix: better warning for download error (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 authored Dec 14, 2024
1 parent 34b9851 commit e471031
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/superqt/iconify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ def addKey(
"""
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)
Expand Down

0 comments on commit e471031

Please sign in to comment.