Add try{} catch{} blocks

Close #1