IWireMockLogger.Error(string, Exception)

This commit is contained in:
Stef Heyenrath
2024-10-29 19:55:02 +01:00
parent 3693d6a676
commit 38c2131472

View File

@@ -54,13 +54,13 @@ public class WireMockConsoleLogger : IWireMockLogger
/// <see cref="IWireMockLogger.Error(string, Exception)"/>
public void Error(string message, Exception exception)
{
Console.WriteLine(Format("Error", $"{message} {{0}}", exception.Message));
Console.WriteLine(Format("Error", $"{message} {{0}}", exception));
if (exception is AggregateException ae)
{
ae.Handle(ex =>
{
Console.WriteLine(Format("Error", "Exception {0}", ex.Message));
Console.WriteLine(Format("Error", "Exception {0}", ex));
return true;
});
}