example showing use of panic()/recover() with defer