Skip to content

Commit d2d0a7d

Browse files
committed
Adding description to new exception extention.
1 parent 9030ab3 commit d2d0a7d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Microsoft.Health.Fhir.Core/Extensions/ExceptionExtensions.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@ public static bool IsRequestEntityTooLarge(this Exception e)
4242
return e is RequestEntityTooLargeException || e?.InnerException is RequestEntityTooLargeException;
4343
}
4444

45-
public static bool IsCompletedTransactionException(this InvalidOperationException ioe)
45+
/// <summary>
46+
/// Determines whether the exception if caused by a C# SQL Transaction already committed.
47+
/// </summary>
48+
/// <param name="e">The exception</param>
49+
public static bool IsCompletedTransactionException(this InvalidOperationException e)
4650
{
47-
return ioe?.Message?.Contains(_completedSqlTransactionError, StringComparison.OrdinalIgnoreCase) ?? false;
51+
return e?.Message?.Contains(_completedSqlTransactionError, StringComparison.OrdinalIgnoreCase) ?? false;
4852
}
4953
}
5054
}

0 commit comments

Comments
 (0)