Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WireMockConsoleLogger aggregate exception handling bug? #756

Closed
siewers opened this issue May 19, 2022 · 1 comment
Closed

WireMockConsoleLogger aggregate exception handling bug? #756

siewers opened this issue May 19, 2022 · 1 comment
Labels

Comments

@siewers
Copy link
Contributor

siewers commented May 19, 2022

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

if (exception is AggregateException ae)
{
ae.Handle(ex =>
{
Console.WriteLine(Format("Error", "Exception {0}", exception.Message));
return true;
});
}

Shouldn't it be like this?

ae.Handle(ex => 
{ 
    Console.WriteLine(Format("Error", "Exception {0}", ex.Message)); // ex instead of exception
    return true; 
}); 
@StefH StefH added the bug label May 19, 2022
@StefH
Copy link
Collaborator

StefH commented May 19, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants