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

Exception --> logged error in ResolvePackageAssets #40851

Open
wants to merge 3 commits into
base: release/8.0.4xx
Choose a base branch
from

Conversation

Forgind
Copy link
Member

@Forgind Forgind commented May 13, 2024

Resolves AB#2047667

I confirmed with the customer that this was not an unexpected error for them but rather one where they hadn't expected to see a full stack trace; they'd just wanted to see a clean message about what went wrong.

This is in the ResolvePackageAssets task. It would be nice if instead of throwing an exception, we could log an error. Unfortunately, the code that actually throws is deep in another class, which means we would have to either return the error up the stack or catch any NRE from almost anywhere in ResolvePackageAssets. This does neither by converting the NRE into a new exception type at the point where the exception might be expected, then catching it and logging an error at the top level.

Also let me know if you want me to push the catch (AcceptableNullReferenceException) down the stack a bit.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-ReadyToRun untriaged Request triage from a team member labels May 13, 2024
@Forgind Forgind marked this pull request as ready for review May 13, 2024 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-ReadyToRun untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant