From 7eebbfc7b28399c2010015d0de9a99146a1fef97 Mon Sep 17 00:00:00 2001 From: falood <falood@gmail.com> Date: Sun, 23 Jul 2017 17:32:21 -0700 Subject: [PATCH] replace {:stop, reason} by :ignore to make sure start app never fail --- lib/file_system/backend.ex | 2 +- lib/file_system/worker.ex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/file_system/backend.ex b/lib/file_system/backend.ex index 293a09b..7d39724 100644 --- a/lib/file_system/backend.ex +++ b/lib/file_system/backend.ex @@ -61,7 +61,7 @@ defmodule FileSystem.Backend do if os_type in module.supported_systems() do :ok 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} end end diff --git a/lib/file_system/worker.ex b/lib/file_system/worker.ex index fbdee6b..a773655 100644 --- a/lib/file_system/worker.ex +++ b/lib/file_system/worker.ex @@ -18,8 +18,8 @@ defmodule FileSystem.Worker do {:ok, backend} -> {:ok, backend_pid} = backend.start_link([{:worker_pid, self()} | Keyword.drop(args, [:backend])]) {:ok, %{backend_pid: backend_pid, subscribers: %{}}} - {:error, reason} -> - {:stop, reason} + {:error, _reason} -> + :ignore end end -- GitLab