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

Improve error reporting for build telemetry reporter #4073

Open
bernardnormier opened this issue Sep 16, 2024 · 0 comments
Open

Improve error reporting for build telemetry reporter #4073

bernardnormier opened this issue Sep 16, 2024 · 0 comments
Milestone

Comments

@bernardnormier
Copy link
Member

Currently, when the build telemetry reporter code throws an exception, the program fails with exit code 1 and .NET prints a stack trace for the exception. The MSBuild task "continues on error" so it doesn't affect the build (it just shows this task failing with exit code 1).

We should improve this error handling as follows:

  • for expected errors, catch the exception/error, print/log a short message and return 0
    For example, when the build telemetry server is unreachable, or the reporting timed out
  • for unexpected errors, catch the exception/error, print/log the exception message + inner exception name/message (if any), but not the full stack trace, and return 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant