package main

import (
	"fmt"
)

func tryRecover() {

	defer func() {
		r := recover()
		if err, ok := r.(error); ok {
			fmt.Println(" Error occurrend : ", err)
		} else {
			panic(r)
		}
	}()

	// panic( errors.New("this is an error !"))
	b := 0
	a := 199 / b
	fmt.Println(a)

}

func main() {
	tryRecover()
}
