haskell / aeson

A fast Haskell JSON library
Other
1.25k stars 321 forks source link

Warn about possible exceptions during file decoding #1022

Open deemp opened 1 year ago

deemp commented 1 year ago

In my project, I spent a couple of hours trying to determine the reason for an exception withBinaryFile: does not exist (No such file or directory). After reading the current aeson docs, I expected that the case when the file is missing is also reported as a String error.

I see that currently, this is not true. I'm not sure these functions should handle missing files so I suggest to just warn about possible exceptions.