PhoenixmlDb.Core

DocumentNotFoundException

Thrown when a document with the specified name does not exist in the container.

#DocumentNotFoundException

Namespace: PhoenixmlDb.Core

Thrown when a document with the specified name does not exist in the container.

When it's thrown: By operations that require a document to exist, such as IContainer.SetMetadataAsync or IWriteTransaction.SetMetadataAsync when the target document has not been stored. Note that IContainer.GetDocumentAsync returns null rather than throwing.

How to handle it: Check the DocumentNotFoundException.DocumentName property for the missing document's name and the DocumentNotFoundException.Container property for the container it was expected in. Use IContainer.DocumentExistsAsync for a lightweight existence check before operations that require the document.