Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ChronoJsonDiffPatch/ChronoJsonDiffPatch/PatchingException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class PatchingException<TEntity> : Exception
/// <summary>
/// state of the entity at the point where Applying <see cref="FailedPatch"/> failed
/// </summary>
public JToken StateOfEntityBeforePatch { get; }
public TEntity StateOfEntityBeforePatch { get; }

/// <summary>
/// patch that could not be applied
Expand All @@ -41,7 +41,7 @@ public class PatchingException<TEntity> : Exception
/// <param name="innerException"></param>
public PatchingException(
TEntity stateOfEntityBeforeAnyPatch,
JToken left,
TEntity left,
JToken? patch,
int index,
string message,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ var existingPatch in GetAll()

throw new PatchingException<TEntity>(
stateOfEntityBeforeAnyPatch: initialEntity,
left: left,
left: entityBeforePatch,
patch: jtokenPatch,
index: index,
message: $"Failed to apply patches ({PatchingDirection}): {exc.Message}; None of the {_skipConditions?.Count() ?? 0} skip conditions applied",
Expand Down Expand Up @@ -647,7 +647,7 @@ var existingPatch in GetAll()

throw new PatchingException<TEntity>(
stateOfEntityBeforeAnyPatch: initialEntity,
left: left,
left: entityBeforePatch,
patch: jtokenPatch,
index: index,
message: $"Failed to apply patches ({PatchingDirection}): {exc.Message}; None of the {_skipConditions?.Count() ?? 0} skip conditions applied",
Expand Down
Loading