The StGB (Strafgesetzbuch, the German criminal code) provides for insanity and diminished responsibility (§20 and 21, respectively). Insanity means "incapable of appreciating the unlawfulness of [one's] actions" and a successful insanity plea results in a not guilty decision. Under diminished responsibility, a sentence of life imprisonment becomes a sentence of not less than three years in prison (§49). This is, of course, the modern version where there is no death penalty. I have no idea how insanity worked in Austrian law.
The StGB of 1933-1953 specifies in section 20 that, when there is a choice between imprisonment at hard labor and imprisonment, a person may be sentenced to imprisonment without hard labor if "the act has not been directed against the good of the people and the offender has acted solely on honorable grounds."
The StGB of 1933-1953 specifies in section 20 that, when there is a choice between imprisonment at hard labor and imprisonment, a person may be sentenced to imprisonment without hard labor if "the act has not been directed against the good of the people and the offender has acted solely on honorable grounds."