def _create_preference_update_error(preference_key, preference_value, error):
 return PreferenceUpdateError(developer_message=u"Save failed for user preference '{key}' with value '{value}': {error}".format(key=preference_key, value=preference_value, error=error), user_message=_(u"Save failed for user preference '{key}' with value '{value}'.").format(key=preference_key, value=preference_value))

def _create_preference_update_error ( preference_key , preference_value , error ) : return PreferenceUpdateError ( developer_message = u"Save failed for user preference '{key}' with value '{value}': {error}" . format ( key = preference_key , value = preference_value , error = error ) , user_message = _ ( u"Save failed for user preference '{key}' with value '{value}'." ) . format ( key = preference_key , value = preference_value ) )
creates a preferenceupdateerror with developer_message and user_message .