Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge...
by wruza on Thursday August 06, 2020 @12:39PM
(#24072630)
Error handling can be easily added to the example wrapper above, completely hiding all the burden from a user of foo(), who then could do their usual try-catch. It's just my phone keyboard that prevents me from implementing it right here.
... but this is exactly the reason why callback hell existed. Error handling down the callback branches were a total mess, especially with networked state transfers.