D

Size: a a a
D

LL
{:ok, :ok, [%{"http" => %{"port" => port}}]} = passingD
D
conf = Webserver.Yaml.parse()D
{:ok, :ok, [%{"http" => %{"port" => port}}]} = passingLL
rescue{:ok, parsed} = YamlElixir...D
rescue{:ok, parsed} = YamlElixir...D
PG
Logger.warn(e)D
D
LL
rescue происходит что-то типа case, где матчинг по ошибкеresuce
e in Error1 ->
Logger.warn e
{:error, e}
e in Error2 ->
Logger.warn e
do_something()
endD
ŹR
ŹR
VA
ŹR
VA
DS
ŹR
def config() do
case YamlElixir.read_all_from_file(config_file_path()) do
{:error, reason} ->
Logger.error(reason)
exit(e)
success -> success
end
end
defp config_file_path(), do: Path.join(File.cwd!(), "conf.yml")