Use exceptions correctly.