/// <summary> /// Adds a new operation error notification. /// </summary> /// <param name="code">Notification code</param> /// <param name="attributes">Optional notification attributes</param> /// <param name="exception">Optional notification exception</param> /// <returns>This exception object</returns> /// <remarks> /// This method can be used directly in throw statement. /// </remarks> public BusinessOperationException AddOperationError(string code, IList <object> attributes = null, Exception exception = null) { EnsureNotifications(); Notifications.AddOperationError(code, attributes, exception); return(this); }