Skip to content

Commit

Permalink
Raise if trying to decode decimals without decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
fhunleth authored and michalmuskala committed Jul 15, 2024
1 parent 79d59df commit f775592
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/decoder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ defmodule Jason.Decoder do
end
end
end
else
defp float_decode_function(%{floats: :decimals}) do
raise ArgumentError, "decimal library not found, :decimals option not available"
end
end

defp value(data, original, skip, stack, decode) do
Expand Down

0 comments on commit f775592

Please sign in to comment.