Skip to content

Add missing semicolon #24989

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

Merged
merged 1 commit into from
Jul 6, 2021
Merged

Add missing semicolon #24989

merged 1 commit into from
Jul 6, 2021

Conversation

Youssef1313
Copy link
Member

I'm also wondering, can't the code be simplified from:

public void Test(string id)
{
    try
    {
        if (id == "none")
        {
            throw new Exception("Default Id detected.");
        }
    }
    catch (Exception ex)
    {
        _logger.LogWarning(
            AppLogEvents.Error, ex,
            "Failed to process iteration: {Id}", id);
    }
}

to:

public void Test(string id)
{
    if (id == "none")
    {
        _logger.LogWarning(
            AppLogEvents.Error, new Exception("Default Id detected."),
            "Failed to process iteration: {Id}", id);
    }
}

@Youssef1313 Youssef1313 requested a review from a team as a code owner July 5, 2021 11:00
@dotnet-bot dotnet-bot added this to the July 2021 milestone Jul 5, 2021
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Youssef1313

I'll :shipit: now.

@BillWagner BillWagner merged commit b994265 into dotnet:main Jul 6, 2021
@Youssef1313 Youssef1313 deleted the patch-17 branch July 6, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants