Open Oldes opened 3 years ago
It would indeed be great if error shown a message from the OS. In the console we usually know what's happening but in a GUI program it's simply not nice to show dumb "no can't do" errors. With extra info, programmer will be able to deliver this info to the user.
It's a bigger design question though, what I/O operations should provide more verbosity in errors.
Possible scenario where the change would be useful:
false
when FILE is locked and also when does not exists (which is ok), we must do additional check, if file exists.
Although I consider as a nice change, that
delete %not-existing-file
now returnsfalse
instead throwing an error, I still believe, that it should throw an error, if the file exists and cannot be deleted (rights, locked..).https://gitter.im/red/bugs?at=603278b347585464db91e088
Currently:
Expected:
The error could also contain a reason, but I'm not sure if it's necessary.