Effective Error Logging: Capturing Stack Traces Without Unwanted Recovery

is there a better to way log errors in a way that allows you to see the stack trace?
I had basically a catchAll(Console.error) which was just loging out
{
  _id: 'ParseError',
  message: 'Expected ... actual null'
}


which was actually quite unhelpful because there were like 5 places it couldve come from

if I catchAll((e) => Console.error(e.toString())) then I get the tree formatted version of the error
{ ... }
└─ ["text"]
   └─ is missing


and only when I catchAllCause((e) => Console.error(e.toString()) I get the trace
Expected { ...}, actual null
    at <anonymous> 
    ...


but now im recovering from defects I dont want to
Was this page helpful?