News for hackers. Stuff that matters.
Re:Code Design Decision – Always throw custom exceptions by sandinmyjoints on Monday December 19, 2022 @12:41PM (#34054969)
I really wish English had different individual words for the concepts "known [problem] we should not worry about" and "[problems] I did not anticipate".
Re:Code Design Decision – Always throw custom exceptions by cduzz on Monday December 19, 2022 @01:52PM (#34055999)
warning (a not fatal thing happened; took too long)

error (a fatal thing I was expecting happened; I couldn't reach the API)

exception (a fatal thing I wasn't expecting happened; the runtime fault handler did a thing named XYZ)

Re:Code Design Decision – Always throw custom exceptions by hbrn on Monday December 19, 2022 @01:56PM (#34056065)
ERROR and WARNING log levels.

Everything goes to ERROR by default, some errors get downgraded to WARNING when you confirm they are not important.

Send ERRORs to Sentry (or whatever you use) and deal with them immediately. Send WARNINGs to your favorite centralized logging solution and deal with them when there's too many.