Skip to content

Commit 6f5f77f

Browse files
committed
Merge branch 'detect-scene-error' of https://github.com/axelson/scenic into axelson-detect-scene-error
2 parents 6332fce + 47c9c20 commit 6f5f77f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/scenic/view_port.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,10 @@ defmodule Scenic.ViewPort do
420420
GenServer.call(pid, {:set_root, scene, args})
421421
end
422422

423+
def set_root(_, %Scene{}, _) do
424+
raise "You must pass the module that represents the scene you want to switch to here, not a `%Scenic.Scene{}`"
425+
end
426+
423427
# --------------------------------------------------------
424428
@doc """
425429
Send raw input to a viewport.

0 commit comments

Comments
 (0)