Skip to content

Stack Overflow, Better Error Handling #21

Open
@theSoberSobber

Description

@theSoberSobber
  • 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
}

Metadata

Metadata

Labels

bugSomething isn't workingurgent

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions