This is the best all-purpose warning that the other person has transgressed. Different degrees of anger can be expressed by it.
"I beg your pardon?"
Asked with raised eyebrows means "You'd better explain that you did not mean what you actually said."
A loud "I beg your pardon!" means "Retreat this instant!"
Or so says Miss Manners... I can't believe I bought this book. LOL