core: proper exception when read_file fails
This commit is contained in:
parent
c466b0b645
commit
012f01ae14
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue