mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-24 01:08:28 +02:00
IWireMockLogger.Error(string, Exception)
This commit is contained in:
@@ -54,13 +54,13 @@ public class WireMockConsoleLogger : IWireMockLogger
|
|||||||
/// <see cref="IWireMockLogger.Error(string, Exception)"/>
|
/// <see cref="IWireMockLogger.Error(string, Exception)"/>
|
||||||
public void Error(string message, Exception 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)
|
if (exception is AggregateException ae)
|
||||||
{
|
{
|
||||||
ae.Handle(ex =>
|
ae.Handle(ex =>
|
||||||
{
|
{
|
||||||
Console.WriteLine(Format("Error", "Exception {0}", ex.Message));
|
Console.WriteLine(Format("Error", "Exception {0}", ex));
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user