News for hackers. Stuff that matters.
Re:You’re better off using Exceptions by baby on Monday February 03, 2020 @11:47AM (#22225916)
Actually, I’d argue that exception (that are caught) should only be used for recoverable errors. If you can’t recover, then you should crash.
Re:You’re better off using Exceptions by munificent on Monday February 03, 2020 @01:17PM (#22227148)
The great thing about exceptions is that they implement both of these behaviors with a single mechanism.

For recoverable errors, you catch.

For unrecoverable ones, you don't. The exception throwing mechanism unwinds the entire stack and crashes the app with a helpful stack trace.

Re:You’re better off using Exceptions by baby on Wednesday February 05, 2020 @01:29PM (#22249656)
True!