You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
func main() {
defer func() {
println("RECOVER", recover())
}()
p := 0
println(11 / p)
}
it panics with panic running expression main(): runtime error: integer divide by zero. This is to be expected, however seeing as we have a deferred function with recover, this should ideally be catchable by said function.
The text was updated successfully, but these errors were encountered:
With further investigation, it seems like this is a more general problem where only explicit panics are handled when the user code has a function call to panic.
The implicit panics are not handled.
running the following program:
it panics with
panic running expression main(): runtime error: integer divide by zero
. This is to be expected, however seeing as we have a deferred function with recover, this should ideally be catchable by said function.The text was updated successfully, but these errors were encountered: