Esempio n. 1
0
func dangarous2(fail bool) (e error) {
	defer try.Catch(&e)
	if fail {
		panic(errors.New("panic with os.Error"))
	} else {
		e = errors.New("Plain old os.Error")
	}
	return
}
Esempio n. 2
0
func dangarous(fail bool) (e error) {
	defer try.Catch(&e)
	if fail {
		panic("I've failed you")
	} else {
		e = errors.New("Plain old os.Error")
	}
	return
}