exception testing for different subclass of exception.