You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
currently I/O errors are caught in a try/catch and simply return true or false depending on whether or not it was successful.
this makes it difficult to debug as the return value false provides no information as to what went wrong
Describe the solution you'd like
these methods in FileSystem should just throw when they fail
Describe alternatives you've considered
perhaps a flag to change the error handling behavior, if you want the user to have the choice
Additional context
this made debugging difficult when implementing #83. i had to change the tryIfExists private method to throw instead when it fails, then changed it back such that it matches the behavior of the other targets.
The text was updated successfully, but these errors were encountered:
I agree, this totally makes sense. I vaguely remember why I did it this way in the first place. I think it was somewhat complicated to create a neat API which throws errors on ios and thats probably why, I chose to suppress the errors and return a flag instead. But it has been an year, so I can't say for sure.
Is your feature request related to a problem? Please describe.
currently I/O errors are caught in a try/catch and simply return true or false depending on whether or not it was successful.
this makes it difficult to debug as the return value
false
provides no information as to what went wrongDescribe the solution you'd like
these methods in
FileSystem
should just throw when they failDescribe alternatives you've considered
perhaps a flag to change the error handling behavior, if you want the user to have the choice
Additional context
this made debugging difficult when implementing #83. i had to change the
tryIfExists
private method to throw instead when it fails, then changed it back such that it matches the behavior of the other targets.The text was updated successfully, but these errors were encountered: