We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c91039 commit 5d407bbCopy full SHA for 5d407bb
lib/scenic.ex
@@ -64,13 +64,17 @@ defmodule Scenic do
64
def start_link(vps \\ [])
65
66
def start_link(vps) when is_list(vps) do
67
- {:ok, pid} = Supervisor.start_link(__MODULE__, nil, name: :scenic)
+ case Supervisor.start_link(__MODULE__, nil, name: :scenic) do
68
+ {:ok, pid} ->
69
+ # start the default ViewPort
70
+ Enum.each(vps, &Scenic.ViewPort.start(&1))
71
- # start the default ViewPort
- Enum.each(vps, &Scenic.ViewPort.start(&1))
72
+ # return the original start_link value
73
+ {:ok, pid}
74
- # return the original start_link value
- {:ok, pid}
75
+ error ->
76
+ error
77
+ end
78
end
79
80
# --------------------------------------------------------
0 commit comments