Throw the book at (someone)

To punish someone severely for breaking a rule or the law.

The judge threw the book at the man after he was convicted of robbing a bank.