On 2014-09-28 03:24, Steven Schveighoffer wrote:

Library code often cannot make that choice. The issue with exceptions
vs. errors is that often you don't know where the input comes from.

e.g.:

auto f = File(someInternalStringThatIsCorrupted) -> error
auto f = File(argv[1]) -> exception

How does File know what it's target file name came from?

Both of theses should throw an exception. Most stuff related to file operations should throw an exception, not an error.

--
/Jacob Carlborg

Reply via email to