Skip to content

Commit

Permalink
Update ConcurrencyException.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienros authored Jun 6, 2024
1 parent 54bcff5 commit 2236343
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/YesSql.Abstractions/ConcurrencyException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,11 @@ namespace YesSql
{
public class ConcurrencyException : Exception
{
private readonly string _message;

public Document Document { get; }

public ConcurrencyException(Document document)
public ConcurrencyException(Document document) : base($"The document with Id '{document.Id}' and type '{document.Type}' could not be updated as it has been changed by another process.")
{
Document = document;

_message= $"""
The document could not be updated as it has been changed by another process.
ID: {Document.Id}
Type: {Document.Type}
Version: {Document.Version}
Content: {Document.Content}
""";
}

public override string Message { get { return _message; } }
}
}

0 comments on commit 2236343

Please sign in to comment.