Throw an exception if a locale is set that is not defined on the platform