Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
unhandled promise rejections
Just this week I was seeing those and wondering:
"If I didn't already know what was going on here (because I just wrote the code) how the hell would I find this out?"
Granted I do have some path's I'd explore but that was a particularly unhelpful error that didn't really point you anywhere.... -
I simply *do not* understand why they did that. *Crash my program, please.*
It was around that time I started to see things go downhill, by the way. That was one of the first major red flags that the Javascript ecosystem was being tainted by handholding and idiocracy. -
@junon I don't know whether you're for or against continuing to run a program in an unknown state.
-
@junon
I don't have a problem with the crash as much as how very unhelpful the initial error is.
I've found node / js errors generally way more friendly than the unhanded promise rejection. -
@homo-lorens Completely against.
Unhandled promise rejections should have nuked the process just like any other exception, from day one. Why they added some nonsense warning is beyond me. Why allow people to footgun themselves into a hole? -
@junon I think it had to do with the fact that it uses a browser-oriented engine and nuking chrome when you visit a bad website isn't an option.
Related Rants
I swear to god this industry needs some serious purging. I was trying to google the parameter to Node that crashes on unhandled promise rejections so that I can get a stack trace and debug it properly, and literally all relevant SO questions were asking how to _prevent node from crashing on unhandled promise rejections_. In what realm is that preferred behavior?
rant
node
pain