Adding some sample code for exceptions.