This was a common parting message given to the warriors of ancient Sparta before they left for war. The soldiers in the phalanx were each issued a large bronze shield, called a hoplon. Due to its size, if one of them returned from battle without his shield it was suspected that he had dropped it to flee the battle.

If the soldier died valiantly in battle his comrades could use his shield as a kind of litter to drag his body back to Sparta.

Thus, the meaning of the saying is clear. The only acceptable options are:

  1. Return victorious (with your shield)
  2. Return dead (on your shield)

This saying is occasionally referenced by more wizardly software engineers to teach the youngsters to stop making up various error codes for their functions to return. The function should either return a valid result (with its shield) or throw an exception (don't return). Under no circumstances should it return without a valid result.