Don't rescue from FunctionClauseErrors in readers and writers
This commit is contained in:
parent
7d4280ec9a
commit
266ca1f159
2 changed files with 2 additions and 0 deletions
|
@ -62,6 +62,7 @@ defmodule RDF.Serialization.Reader do
|
||||||
|> File.stream!(file_mode(decoder, opts))
|
|> File.stream!(file_mode(decoder, opts))
|
||||||
|> decoder.decode_from_stream(opts)
|
|> decoder.decode_from_stream(opts)
|
||||||
rescue
|
rescue
|
||||||
|
error in FunctionClauseError -> reraise error, __STACKTRACE__
|
||||||
error in RuntimeError -> {:error, error.message}
|
error in RuntimeError -> {:error, error.message}
|
||||||
error -> {:error, error}
|
error -> {:error, error}
|
||||||
end
|
end
|
||||||
|
|
|
@ -39,6 +39,7 @@ defmodule RDF.Serialization.Writer do
|
||||||
|
|
||||||
:ok
|
:ok
|
||||||
rescue
|
rescue
|
||||||
|
error in FunctionClauseError -> reraise error, __STACKTRACE__
|
||||||
error in RuntimeError -> {:error, error.message}
|
error in RuntimeError -> {:error, error.message}
|
||||||
error -> {:error, error}
|
error -> {:error, error}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue