mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-09-17 23:31:38 +02:00
Write logging in case a Matcher throws an exception (#986)
* ThrowException * ... * . * ... * b * fix test * ... * . * sonar * ft * . * fix tst
This commit is contained in:
@@ -34,8 +34,6 @@ internal class AzureADAuthenticationMatcher : IStringMatcher
|
||||
|
||||
public MatchBehaviour MatchBehaviour => MatchBehaviour.AcceptOnMatch;
|
||||
|
||||
public bool ThrowException => false;
|
||||
|
||||
public AnyOf<string, StringPattern>[] GetPatterns()
|
||||
{
|
||||
return EmptyArray<AnyOf<string, StringPattern>>.Value;
|
||||
@@ -43,7 +41,7 @@ internal class AzureADAuthenticationMatcher : IStringMatcher
|
||||
|
||||
public MatchOperator MatchOperator { get; } = MatchOperator.Or;
|
||||
|
||||
public double IsMatch(string? input)
|
||||
public MatchResult IsMatch(string? input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input))
|
||||
{
|
||||
@@ -70,9 +68,9 @@ internal class AzureADAuthenticationMatcher : IStringMatcher
|
||||
|
||||
return MatchScores.Perfect;
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
return MatchScores.Mismatch;
|
||||
return new MatchResult(MatchScores.Mismatch, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user