Add exception handling for throw statement.