That is why they tell those who are not certain of their vocation to join the seminary, then if you feel it isn't God's Will for you to be a priest, leave before you are ordained. That's the way Matthew did it. That is, afterall, something that is to be discerned BEFORE one becomes a priest, not after.
A priest who wants to get married is basically cheating on the Church so to speak, because the Church is their bride.