WireMockConsoleLogger aggregate exception handling bug? #419

Closed
opened 2025-12-29 15:23:28 +01:00 by adam · 1 comment
Owner

Originally created by @siewers on GitHub (May 19, 2022).

It seems like the handling of the aggregate exception is wrong.

d7173d34a3/src/WireMock.Net/Logging/WireMockConsoleLogger.cs (L50-L57)

Shouldn't it be like this?

ae.Handle(ex => 
{ 
    Console.WriteLine(Format("Error", "Exception {0}", ex.Message)); // ex instead of exception
    return true; 
}); 
Originally created by @siewers on GitHub (May 19, 2022). It seems like the handling of the aggregate exception is wrong. https://github.com/WireMock-Net/WireMock.Net/blob/d7173d34a3da7f828a0aa706c5283badf2d43da0/src/WireMock.Net/Logging/WireMockConsoleLogger.cs#L50-L57 Shouldn't it be like this? ```cs ae.Handle(ex => { Console.WriteLine(Format("Error", "Exception {0}", ex.Message)); // ex instead of exception return true; }); ```
adam added the bug label 2025-12-29 15:23:28 +01:00
adam closed this issue 2025-12-29 15:23:29 +01:00
Author
Owner

@StefH commented on GitHub (May 19, 2022):

@siewers
I think you are correct. Can you make a PR?

@StefH commented on GitHub (May 19, 2022): @siewers I think you are correct. Can you make a PR?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#419