A Dark Problem
The rules which the Torah proscribes for capital cases are such that a Jewish court always seeks to do its utmost to spare the life of the accused, if at all possible. Despite the numerous crimes for which one can incur the death penalty, the Talmud tells us that, in fact, only very infrequently did Jewish courts ever execute anyone. The Torah's legal system is structured in such a way that unless a multitude of very technical requirements are met, a person cannot be condemned to death. Loopholes abound, so to speak. One such "loophole" mentioned in Sanhedrin goes so far as to state that if after deliberation, the court unanimously condemns a person to die (23-0), "we release him immediately".
There are those who learn this law not as a loophole, but as a euphemistic way of reminding us to fulfill the verse - "We release him immediately"- from this world; we kill him without delay. Most authorities, however, maintain that this dictum tells us that we must set the person free. The law is such because the verdict must have been faulty or surely someone would have found at least some merit in the person's defense.
Noteworthy, is the view of the Sma"h, whose opinion lies somewhere in between these the above two opinions. He says that we do in fact set him free - but only in a case where the guilt of the accused has been determined by only one reason. If, however, the court found him guilty for multiple reasons, it is an indication that its members did in fact do their job of considering all the possibilities. And in such a case, the guilty would be executed.
This explanation of the Sma"h is very helpful in understanding a difficulty posed by the midrash, that when G-d wanted to bring the plague of darkness upon the Egyptians, he consulted with the angels first. They unanimously agreed that the Egyptians were deserving of such punishment. But if they all agreed, and not even a single angel came to the defense of the Egyptians, should not the Talmud's law have gone into effect? Should not the Egyptians have been exonerated?
The Midrash can be understood if we utilize the view of the Sma"h. The Midrash, in fact, tells us that there were two reasons for the plague of darkness. The first was to allow for the deaths of those Jews who were wicked. By having been killed during this plague, the Egyptians would not witness their deaths and thus Chilul Hashem would be avoided. Secondly, this plague was intended to allow the Jews an opportunity to locate the Egyptians silver and gold. Thus, before their departure when they were commanded to take these vessels, and the Egyptians would try to deny having them, the Jews could point to particular cabinets in which the vessels were kept.
Therefore, there are two reasons for the plague of darkness. Consequently, according to the Sma"h the fact that the angels were unanimous in their decision does not pose a difficulty.