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))
|
||||
|> decoder.decode_from_stream(opts)
|
||||
rescue
|
||||
error in FunctionClauseError -> reraise error, __STACKTRACE__
|
||||
error in RuntimeError -> {:error, error.message}
|
||||
error -> {:error, error}
|
||||
end
|
||||
|
|
|
@ -39,6 +39,7 @@ defmodule RDF.Serialization.Writer do
|
|||
|
||||
:ok
|
||||
rescue
|
||||
error in FunctionClauseError -> reraise error, __STACKTRACE__
|
||||
error in RuntimeError -> {:error, error.message}
|
||||
error -> {:error, error}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue