now throws the correct exception