Skip to content

Commit 9e4ae85

Browse files
authored
chore: improve error meesage in register_action (#257)
1 parent 25b4799 commit 9e4ae85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app_model/registries/_register.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ def my_action3():
231231
menus=menus,
232232
keybindings=keybindings,
233233
)
234-
raise TypeError("'id_or_action' must be a string or an Action")
234+
raise TypeError(
235+
f"'id_or_action' must be a string or an Action not {type(id_or_action)}"
236+
)
235237

236238

237239
def _register_action_str(

0 commit comments

Comments
 (0)