8000 Annotating ThrowTerminatingError with [DoesNotReturn] by powercode · Pull Request #15352 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Annotating ThrowTerminatingError with [DoesNotReturn] #15352

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

Conversation

powercode
Copy link
Collaborator

PR Summary

Add codeanalysis attribute [DoesNotReturn] to ThrowTerminatingError

PR Context

Helps with code that has a return value but calls ThrowTerminatingError. Without it, code analysis suggests it is an error to not return a value in that code path.

PR Checklist

@powercode powercode requested a review from anmenaga as a code owner May 5, 2021 14:52
@ghost ghost assigned daxian-dbw May 5, 2021
@daxian-dbw daxian-dbw merged commit efdc500 into PowerShell:master May 6, 2021
@powercode powercode deleted the ThrowTerminatingErrorDoesNotReturn branch May 7, 2021 13:14
@daxian-dbw daxian-dbw added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label May 26, 2021
@ghost
Copy link
ghost commented May 27, 2021

🎉v7.2.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0