News for hackers. Stuff that matters.
Re:Current hardware trends make C++ exceptions harder to jus... by jcelerier on Tuesday February 22, 2022 @04:42PM (#30434290)
Not in C++ I believe ?
Re:Current hardware trends make C++ exceptions harder to jus... by TheMonarchist on Tuesday February 22, 2022 @06:23PM (#30435303)
Re:Current hardware trends make C++ exceptions harder to jus... by YATA0 on Friday February 25, 2022 @01:49AM (#30464346)
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.

Re:Current hardware trends make C++ exceptions harder to jus... by jcelerier on Wednesday February 23, 2022 @03:04AM (#30438789)
Damn, in all those years I've absolutely never come across this, thanks
Re:Current hardware trends make C++ exceptions harder to jus... by foldr on Tuesday February 22, 2022 @05:22PM (#30434727)
The C++ standard IO library doesn't enable exceptions by default, but IIRC that's just a relic of the fact that it dates back to when C++ didn't have exceptions.
Re:Current hardware trends make C++ exceptions harder to jus... by mpyne on Tuesday February 22, 2022 @05:23PM (#30434733)
It's library dependent. iostreams (part of C++ std lib) doesn't throw exceptions by default but I believe it can be configured to throw if you want.