Exodus 22:2

2 [a] If a thief is caught in the act of breaking in, and he is beaten to death, no one is guilty of bloodshed.

Exodus 22:2 In-Context

1 "When a man steals an ox or a sheep and butchers it or sells it, he must repay five cattle for the ox or four sheep for the sheep.
2 If a thief is caught in the act of breaking in, and he is beaten to death, no one is guilty of bloodshed.
3 But if this happens after sunrise, there is guilt of bloodshed. A thief must make full restitution. If he is unable, he is to be sold because of his theft.
4 If what was stolen-whether ox, donkey, or sheep-is actually found alive in his possession, he must repay double.
5 "When a man lets a field or vineyard be grazed in, and then allows his animals to go and graze in someone else's field, he must repay with the best of his own field or vineyard.

Footnotes 1

Holman Christian Standard Bible ® Copyright © 2003, 2002, 2000, 1999 by Holman Bible Publishers.  Used by permission.  All rights reserved.