Throw the correct exception from Country::setCode()