core: proper exception when read_file fails

This commit is contained in:
Marcel Otto 2017-03-11 18:28:46 +01:00
parent c466b0b645
commit 012f01ae14

View file

@ -35,7 +35,7 @@ defmodule RDF.Reader do
def read_file!(file, opts \\ []) do
case read_file(file, opts) do
{:ok, graph} -> graph
{:error, reason} -> raise reason
{:error, reason} -> raise File.Error, path: file, action: "read", reason: reason
end
end