Added exception handling example code.