refactory command execute logic. throw exception if the domain handling has exception.