Hacker News new | ask | show | jobs
by TheMonarchist 1577 days ago
https://en.cppreference.com/w/cpp/io/basic_ios/exceptions
2 comments

That is manually throwing an exception if the file doesn't exist.

C++ stdlib does not throw an exception if a file does not exist. I agree with this philosophy because files not existing isn't an exceptional case.

Damn, in all those years I've absolutely never come across this, thanks