Skip to content

Commit

Permalink
Add more information about problem with texture in the exception (nap…
Browse files Browse the repository at this point in the history
…ari#6642)

# Description

After 0.4.19 release, I started getting exceptions on windows CI and
noticed that exception message is not very useful. This PR is improving
it.
  • Loading branch information
Czaki authored Feb 7, 2024
1 parent 40dd5cf commit 817cc8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion napari/_vispy/layers/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ def get_node(
# it is a bug to hit this error — it is here to catch bugs
# early when we are creating the wrong nodes or
# textures for our data
raise ValueError("dtype does not match texture_format")
raise ValueError(
trans._(
"dtype {dtype} does not match texture_format={texture_format}",
dtype=dtype,
texture_format=res.texture_format,
)
)
return res


Expand Down

0 comments on commit 817cc8e

Please sign in to comment.