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?

  • 0
    Attach your debugger. Let the debugger break on Uncaught exceptions.
  • 1
    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....
  • 1
    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.
  • 2
    @junon I don't know whether you're for or against continuing to run a program in an unknown state.
  • 0

    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.
  • 4
    @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?
  • 1
    @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.
Add Comment