Aside from direct testimony, in order for a Jewish court to carry out a death sentence the witnesses must first warn the perpetrator that the act that he is about to do is forbidden and that the penalty he will receive for doing it is death.
Must the person who is committing the crime know which of the death sentences he may be liable to receive? Rabbi Yirmeya in our Gemara quotes a baraita that suggests that this question is disputed by the tanna’im. According to the Tanna Kamma the prerequisites necessary for carrying out a death sentence are eidah (a court of 23 judges), eidim (witnesses), and hatra’ah (warning) that includes informing him that he may be liable to receive a death sentence. Rabbi Yehuda requires the witnesses to specify to him which death penalty he would get.
The source for the opinion of the Tanna Kamma is a clear case in the Torah. The mekoshesh etzim – the individual who was found gathering wood on Shabbat – was brought before Moshe for trial. According to the Torah, Moshe needed divine direction to determine what to do (see Bamidbar 15:32-36). Clearly the implication is that the punishment was not clear, yet what the witnesses warned him about was sufficient for him to be punished. Rabbi Yehuda argues that the story of the mekoshesh etzim cannot be brought as a proof since it was a hora’at sha’ah – it was a provisional edict, a unique ruling appropriate for that time only.
The Ramah explains this hora’at sha’ah as follows. It was clear that the mekoshesh etzim deserved a death sentence for desecration of the Shabbat. What was unclear was the particular type of death sentence, so at that time the witnesses could not have been so specific in their warning, and the warning that they gave was sufficient. The argument is whether we can learn from that situation and apply it to later cases, as well, or, perhaps, now that the punishments are established a general warning will not suffice.