title: continue executing loop when exception happens
body: <p>During first execution of the loop in the code snippet,an exception throws.my question is how to continue executing next iteration of the loop when panic happens.like try catch mechanism in java,the loop will continue executing next iteration of the loop.</p>
  
  <pre><code>package main
  
  import (
          "fmt"
  )
  
  func main() {
          var arr []int = []int{5, 6, 7, 8, 9}
          fmt.Println(arr)
          for i := 6; i &lt; 10; i++ {
                  defer func() {
                          fmt.Println("aaa")
                          if err := recover(); err != nil {
                                  fmt.Printf("error is %v\n", err)
                          }
                  }()
                  arr[i] = i
  
          }
  
  }
  </code></pre>