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

Add try/catch around FindWorkspace calls to handle FileNotFound #1387

Closed
wants to merge 2 commits into from

Conversation

JoeRobich
Copy link
Member

Resolves #1386

@JoeRobich
Copy link
Member Author

@jmarolf Please take a look

}
catch (FileNotFoundException fex)
{
logger.LogError(fex.Message);
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we show a message saying we couldn't find the file instead of logging an error? Doesn't this still show a stack trace to the user?

Copy link
Member Author

Choose a reason for hiding this comment

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

We log the message because the workspace finder throws this exception with different messages based on how it fails. This does not log the stack trace.

Copy link
Member Author

Choose a reason for hiding this comment

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

We should rework this to not rely on exception handling but wanted to address the regression.

Copy link
Contributor

Choose a reason for hiding this comment

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

since this is in main I am ok with waiting for a full re-work. do we want this to go into the 6.x branch instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing out wrong base branch. Updated to release/6.x

Copy link
Contributor

@jmarolf jmarolf Oct 16, 2021

Choose a reason for hiding this comment

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

alright, I'll email .NET Tactics to see if they want to take this for .NET 6

@JoeRobich JoeRobich changed the base branch from main to release/6.x October 15, 2021 22:11
@sharwell sharwell changed the base branch from release/6.x to main April 27, 2023 21:10
@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@JoeRobich JoeRobich closed this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dotnet format without arguments - show usage instead of stack trace
3 participants