Handle exception.