Closed sypher7 closed 6 years ago
Documentation suggests capturing unhandled panics as such:
func main() { defer honeybadger.Monitor() // ... Exploding code here ... }
However, the Monitor() function will often re-raise the panic's error and exit the application before it can be sent by the backend, since that happens asynchronously.
Monitor()
Force notices to Flush() before re-raising.
Flush()
@sypher7 thanks, this looks good to me!
Problem
Documentation suggests capturing unhandled panics as such:
However, the
Monitor()
function will often re-raise the panic's error and exit the application before it can be sent by the backend, since that happens asynchronously.Solution
Force notices to
Flush()
before re-raising.