Skip to content

Commit

Permalink
refactor: improve error message when closed widget is used
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Jan 10, 2024
1 parent f23e212 commit aa1b12e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solara/server/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def model_id_debug(self: ipywidgets.widgets.widget.Widget):
import solara.comm

if self.comm is None and id(self) in closed_ids and id(self) in closed_stack:
raise RuntimeError(f"Widget has been closed, the stacktrace when the widget was closed is:\n{closed_stack[id(self)]}")
raise RuntimeError(f"Widget {type(self)} has been closed, the stacktrace when the widget was closed is:\n{closed_stack[id(self)]}")

if self.comm is None or isinstance(self.comm, solara.comm.DummyComm) and force_load_instance.comm is not self.comm:
stack = solara.comm.orphan_comm_stacks.get(self.comm)
Expand Down

0 comments on commit aa1b12e

Please sign in to comment.