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.
2 parents 0cdf1bd + 5d407bb commit d3f1e6bCopy full SHA for d3f1e6b
lib/scenic.ex
@@ -61,13 +61,17 @@ defmodule Scenic do
61
def start_link(vps \\ [])
62
63
def start_link(vps) when is_list(vps) do
64
- {:ok, pid} = Supervisor.start_link(__MODULE__, nil, name: :scenic)
+ case Supervisor.start_link(__MODULE__, nil, name: :scenic) do
65
+ {:ok, pid} ->
66
+ # start the default ViewPort
67
+ Enum.each(vps, &Scenic.ViewPort.start(&1))
68
- # start the default ViewPort
- Enum.each(vps, &Scenic.ViewPort.start(&1))
69
+ # return the original start_link value
70
+ {:ok, pid}
71
- # return the original start_link value
- {:ok, pid}
72
+ error ->
73
+ error
74
+ end
75
end
76
77
# --------------------------------------------------------
0 commit comments