Пример #1
0
        private void CollectError(string documentId, string errorString)
        {
            var docIdToUpdateDescriptor = docIdToUpdateDescriptorMap[documentId];
            var operation = docIdToUpdateDescriptor.Operation.ToString().ToLower();

            var error = new CouchError(serializer, errorString);

            if (error.IsConflict)
            {
                exceptions.Add(error.CreateStaleStateException(operation, documentId, docIdToUpdateDescriptor.DocumentRevision));
            }
            else if (error.IsForbidden)
            {
                exceptions.Add(error.CreateInvalidDocumentException(documentId));
            }
            else
            {
                exceptions.Add(error.CreateCouchCommunicationException());
            }
        }
Пример #2
0
        private void CollectError(string documentId, string errorString)
        {
            var docIdToUpdateDescriptor = docIdToUpdateDescriptorMap[documentId];
            var operation = docIdToUpdateDescriptor.Operation.ToString().ToLower();

            var error = new CouchError(serializer, errorString);

            if (error.IsConflict)
                exceptions.Add(error.CreateStaleStateException(operation, documentId, docIdToUpdateDescriptor.DocumentRevision));
            else if (error.IsForbidden)
                exceptions.Add(error.CreateInvalidDocumentException(documentId));
            else
                exceptions.Add(error.CreateCouchCommunicationException());
        }
Пример #3
0
 private DocumentInfo ThrowConflict(CouchError error)
 {
     throw error.CreateStaleStateException("update", document.Id);
 }
Пример #4
0
			private DocumentInfo ThrowConflict(CouchError error)
			{
				throw error.CreateStaleStateException("update", document.Id);
			}