Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove uncaught exception handler #154

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

achingbrain
Copy link
Member

There are no circumstances under which it is safe to ignore uncaught exceptions, since the application is left in an unconsistent state.

The node documentation is unequivocal about this:

https://nodejs.org/api/process.html#warning-using-uncaughtexception-correctly

Any code that can throw an exception should be wrapped in a try/catch or there should be some other method of handling the error.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

There are no circumstances under which it is safe to ignore uncaught
exceptions, since the application is left in an unconsistent state.

The node documentation is unequivocal about this:

https://nodejs.org/api/process.html#warning-using-uncaughtexception-correctly

Any code that can throw an exception should be wrapped in a `try/catch`
or there should be some other method of handling the error.
@achingbrain
Copy link
Member Author

With the latest helia sessions PR code I've been running the until-death npm script without the uncaught exception handler for nearly two days with no crashes and pretty flat memory usage:

image

@SgtPooki
Copy link
Member

With the latest helia sessions PR code I've been running the until-death npm script without the uncaught exception handler for nearly two days with no crashes and pretty flat memory usage:

FYI that it was Helia-DR and Helia (all) specifically that were mentioned as failing in #18 by Dennis

@SgtPooki
Copy link
Member

I believe this is good to remove (as far as tiros falling over goes) with the fix in #158

@achingbrain achingbrain merged commit 43af7c5 into main Jul 9, 2024
4 checks passed
@achingbrain achingbrain deleted the fix/remove-uncaught-exception-handler branch July 9, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants