Use the right exception type