throw exception for internal error