A code hero, or a Hemingway hero, is an archetypal character that crops up regularly in Hemingway's work. Even people who have never actually read any Hemingway have a good idea of what his stock hero is like. He is the man's man; he is a hard-drinking macho guy who throws himself headlong into dangerous, manly pursuits like big game hunting and marlin fishing. He is a lover of wine and women, enjoying every last nanosecond of this mortal life without thought for tomorrow. Death is an omnipresent concern, but he shows manly courage in the face of it, as he helps himself to another shot of bourbon.
The Hemingway hero is a code hero in that he lives by his own moral code, a moral choice that helps him deal with the bleakness of existence. However, a man's code is not some abstract theory that he devised in his leisure hours; it is something he does, an essential feature of how he lives his life. A code hero is a man of action, not a thinker.
On the face of it, it would appear that the priest in A Farewell To Arms does not fit into the category of a Hemingway code hero. He is certainly no macho man. The other guys in Henry's unit rib him mercilessly about his celibacy. Additionally, it is highly unlikely that he has ever bagged a raging bull elephant or caught a marlin. Throw in a devout Christian faith, and it is not looking too good.
Yet, in his own unique way, the priest does share some characteristics of a code hero. For one thing, he lives by a code of ethics. Inevitably, that code is strongly influenced by his Christian faith, as we would expect. However, the priest does not simply parrot the old nostrums or dispense glib homilies. The reason why Harry comes to respect him so much is that he knows the priest has made his own existential choice. In showing a commitment to God, he demonstrates that he is not trying to escape the world. He has put himself on the front line as much as any soldier. It is here, in the face of death and devastation, that his own moral code has been forged. Not only does this earn him Henry's abiding respect, it also gives his words of advice added strength and wisdom, which allows Henry to gain important insights into the meaning of his life.