News for hackers. Stuff that matters.
Re:Current hardware trends make C++ exceptions harder to jus... by jcelerier on Wednesday February 23, 2022 @11:33AM (#30442886)
> . They are a control flow method for when errors occur.

no, not any errors, exceptional errors. Input data coming from "outside" being invalid is not exceptional. The filesystem suddenly becoming inaccessible during a copying or caching operation, the OS not being able to join a thread, your logging backend becoming unable to log because the disk is full, or a regular expression being incorrect are what comes to mind when I think of exceptional situations (unless your program allows users to input regexps). If your program runs on a normal computer in normal conditions, no exceptions should ever be thrown.

There are no comments on this comment yet.