You don't get punished because you had no other choice.
The government needs to protect you, and when they can't, they can't punish you for defending yourself.
if you live in europe you can go to jail, the english are actually enforcing a law that states "you shouldn't put wire within your windows as it 'might injure robbers while they break in'". the us actually has laws that state that you can kill if you have no choice.