Illustrative example
A dog that has been getting into a neighbour's garden is deliberately struck with a spade and needs surgery. The owner is told a dog is worth what was paid for it.
Section 3340 allows exemplary damages where the injury was committed willfully or by gross negligence, in disregard of humanity, over and above the actual loss measured under the general rules. The fact the outcome turns on is state of mind at the moment: driving a dog off a plot is a different thing from striking it once it has left, and the veterinary bill is the floor of the claim rather than its ceiling.
The neighbour pays the veterinary costs in full and a further agreed sum, and the two households agree in writing about fencing and about supervising the dog outside.