// Feed this function a function that may cause errors
Feed this function a function that may cause errors
// Feed this function a function that may cause errors
func protect(to_run func() int) int {
	defer func() {
		stack_trace := recover()
        if stack_trace != nil {
			fmt.Println("Run time panic: ", stack_trace)
		}
	}()
	result := to_run()
    return result
}
func protect ( to_run func ( ) int ) int { defer func ( ) { stack_trace := recover ( ) if stack_trace != nil { fmt . Println ( " " , stack_trace ) } } ( ) result := to_run ( ) return result }
Feed this function a function that may cause errors
Feed this function a function that may cause errors