api/failures/FailureReason.js
/**
		 * Adds a {@link FailureReasonItem} to the tree of reason(s) at the current node.
		 *
		 * @public
		 * @param {FailureType} type - The failure type.
		 * @param {Object=} data - The data associated with the failure type.
		 * @param {Boolean=} group - The reason is expected to have children; therefore, the current tree node is shifted to the newly added {@link FailureReasonItem}.
		 * @returns {FailureReason} - The current instance, allowing for method chaining.
		 */
Adds a  FailureReasonItem to the tree of reason(s) at the current node.
@public
@param {FailureType} type - The failure type.
@param {Object=} data - The data associated with the failure type.
@param {Boolean=} group - The reason is expected to have children; therefore, the current tree node is shifted to the newly added  FailureReasonItem.
@returns {FailureReason} - The current instance, allowing for method chaining.
Adds a FailureReasonItem to the tree of reason ( s ) at the current node . @public @param { FailureType } type - The failure type . @param { Object = } data - The data associated with the failure type . @param { Boolean = } group - The reason is expected to have children ; therefore the current tree node is shifted to the newly added FailureReasonItem . @returns { FailureReason } - The current instance allowing for method chaining .
addItem(type, data, group) {
			assert.argumentIsRequired(type, 'type', FailureType, 'FailureType');
			assert.argumentIsOptional(group, 'group', Boolean);
			const node = this._current.addChild(new FailureReasonItem(type, data));
			if (is.boolean(group) && group) {
				this._current = node;
			}
			return this;
		}
addItem ( type , data , group ) { assert . argumentIsRequired ( type , 'type' , FailureType , 'FailureType' ) ; assert . argumentIsOptional ( group , 'group' , Boolean ) ; const node = this . _current . addChild ( new FailureReasonItem ( type , data ) ) ; if ( is . boolean ( group ) && group ) { this . _current = node ; } return this ; }
Adds a {@link FailureReasonItem} to the tree of reason(s) at the current node.
Adds a { @link FailureReasonItem } to the tree of reason ( s ) at the current node .