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

Stack Overflow, Better Error Handling #21

Open
theSoberSobber opened this issue Mar 26, 2024 · 0 comments
Open

Stack Overflow, Better Error Handling #21

theSoberSobber opened this issue Mar 26, 2024 · 0 comments
Assignees
Labels
bug Something isn't working urgent

Comments

@theSoberSobber
Copy link
Owner

  • Just make all catch's throw errors instead of calling startBot() again.
  • We can use those Errors in a global try catch that we can use to spawn a subprocess, we can have that in a while loop.
  • Calling startBot is a good restart Mechanism but It fails because of stack overflow, if you want personalized logging for all the catche's then just throw personalized errors
    for example,
try {
  functionThatCanThrowError();
} catch (err) {
  throw new Error("Error: ", { cause: err });
  // or "cause" in err
}
@theSoberSobber theSoberSobber self-assigned this Mar 26, 2024
@theSoberSobber theSoberSobber added bug Something isn't working urgent labels Mar 26, 2024
@theSoberSobber theSoberSobber changed the title Stack Oveflow, Better Error Handling Stack Overflow, Better Error Handling Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent
Projects
None yet
Development

No branches or pull requests

1 participant