Skip to content
Snippets Groups Projects
Commit 7eebbfc7 authored by falood's avatar falood
Browse files

replace {:stop, reason} by :ignore to make sure start app never fail

parent e7ea4062
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,7 @@ defmodule FileSystem.Backend do ...@@ -61,7 +61,7 @@ defmodule FileSystem.Backend do
if os_type in module.supported_systems() do if os_type in module.supported_systems() do
:ok :ok
else else
Logger.error "The backend #{backend} you are using does NOT support your current system #{inspect os_type}." Logger.error "The backend `#{backend}` you are using does NOT support your current system #{inspect os_type}."
{:error, :unsupported_system} {:error, :unsupported_system}
end end
end end
......
...@@ -18,8 +18,8 @@ defmodule FileSystem.Worker do ...@@ -18,8 +18,8 @@ defmodule FileSystem.Worker do
{:ok, backend} -> {:ok, backend} ->
{:ok, backend_pid} = backend.start_link([{:worker_pid, self()} | Keyword.drop(args, [:backend])]) {:ok, backend_pid} = backend.start_link([{:worker_pid, self()} | Keyword.drop(args, [:backend])])
{:ok, %{backend_pid: backend_pid, subscribers: %{}}} {:ok, %{backend_pid: backend_pid, subscribers: %{}}}
{:error, reason} -> {:error, _reason} ->
{:stop, reason} :ignore
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment