Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export class IndexedCollectionBaseProperty extends AbstractStaticCollectionPrope

this._setDirty(in_reportToView);
} else {
throw new Error(MSG.REMOVED_NON_EXISTING_ENTRY + in_key);
console.warn(MSG.REMOVED_NON_EXISTING_ENTRY + in_key);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fluid should never write directly to the console. there should be a logger somewhere that you can log an error to.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @anthony-murphy, there is no logger being used in PropertyDDS. And only direct console logs are there.

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,11 @@ export class MapProperty extends IndexedCollectionBaseProperty {
/**
* Removes the entry with the given key from the map
*
* Note: If the key does not exist, a warning is logged and no error is thrown.
* This is intentional to support idempotent operations in collaborative editing scenarios.
*
* @param {string} in_key - The key of the entry to remove from the map
* @throws If trying to remove an entry that does not exist
* @return {*} the item removed
* @return {*} the item removed, or undefined if the key does not exist
*/
remove(in_key) {
var item = this.get(in_key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ export class ReferenceMapProperty extends StringMapProperty {
/**
* Removes the entry with the given key from the map
*
* Note: If the key does not exist, a warning is logged and no error is thrown.
* This is intentional to support idempotent operations in collaborative editing scenarios.
*
* @param {string} in_key - The key of the entry to remove from the map
* @throws If trying to remove an entry that does not exist
* @returns {String} the item removed (a string pathT
* @returns {String} the item removed (a string path), or undefined if the key does not exist
*/
remove(in_key) {
var item = this.getValue(in_key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ export class SetProperty extends IndexedCollectionBaseProperty {
/**
* Removes the given property from the set
*
* Note: If the entry does not exist, a warning is logged and no error is thrown.
* This is intentional to support idempotent operations in collaborative editing scenarios.
*
* @param {property-properties.NamedProperty|string} in_entry - The property or its URN to remove from the set
* @return {property-properties.NamedProperty} the property that was removed.
* @throws if trying to remove an entry that does not exist
* @return {property-properties.NamedProperty} the property that was removed, or undefined if not found
*/
remove(in_entry) {
if (_.isString(in_entry)) {
Expand Down