function errorCallback(error){
                deferred.reject(new Error(error));
            }
Store the value of the given dictionary and key.
@param key The key of the preference.
@param value The value to set.
@param dict The dictionary. It's optional.
@returns Returns a promise.