News for hackers. Stuff that matters.
Re:You’re better off using Exceptions by AstralStorm on Tuesday February 04, 2020 @11:52AM (#22237813)
Why are they a poor choice for the latter?

They have a type, make it say MissingUserException and the special place can handle it in a special way. Ensure it is a subclass of some general exception type you also handle elsewhere and you're good.

Often people throw generic exceptions instead of using the type system.

Re:You’re better off using Exceptions by dllthomas on Tuesday February 04, 2020 @07:50PM (#22242934)
In the latter case you will often want to pass "data or the fact the data was missing" along to other functions. With a result value (of whatever form) that's trivial. With exceptions, it's certainly plenty doable but it's messy.