Change the way to throw exception.