Re:A better way to handle errors in JavaScript
by rswskg on Tuesday October 31, 2023 @06:13AM
(#38082521)
Will throw this in here as it's been useful for errors if operating with try/catch
[ Parent
| on HN ]
Re:A better way to handle errors in JavaScript
by musicq on Tuesday October 31, 2023 @07:35AM
(#38083209)
try/catch has no problem, but the premise is that you know there will be errors been thrown. Say a function `divide`, you can barely tell that whether it will throw errors or not without looking into the source code.