Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardGodefer panic recover mechanicsSingle-choice MCQ

Why does calling recover() in this helper fail to stop the panic?

package main func safeRecover() { if r := recover(); r != nil { _ = r } } func do() { defer safeRecover() panic("boom") } func main() { do() }