Skip to content

Commit

Permalink
Update StateDoesNotExistException.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
the-avid-engineer committed Jan 15, 2024
1 parent c77e5fa commit 8b46517
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/EntityDb.Common/Exceptions/StateDoesNotExistException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ private StateDoesNotExistException(string message) : base(message)
/// <param name="foundStatePointer">The state pointer found by a query.</param>
public static void ThrowIfNotAcceptable(StatePointer requestedStatePointer, StatePointer foundStatePointer)
{
if (requestedStatePointer.StateVersion == StateVersion.Zero &&
foundStatePointer.StateVersion == StateVersion.Zero)
if (requestedStatePointer.StateVersion == StateVersion.Zero)
{
throw new StateDoesNotExistException("Requested latest but found none");
if (foundStatePointer.StateVersion == StateVersion.Zero)
{
throw new StateDoesNotExistException("Requested latest but found none");
}

return;
}

if (requestedStatePointer != foundStatePointer)
Expand Down

0 comments on commit 8b46517

Please sign in to comment.