Correctly raise exception