Skip to content

Annotating ThrowTerminatingError with [DoesNotReturn]#15352

Merged
daxian-dbw merged 1 commit into
PowerShell:masterfrom
powercode:ThrowTerminatingErrorDoesNotReturn
May 6, 2021
Merged

Annotating ThrowTerminatingError with [DoesNotReturn]#15352
daxian-dbw merged 1 commit into
PowerShell:masterfrom
powercode:ThrowTerminatingErrorDoesNotReturn

Conversation

@powercode
Copy link
Copy Markdown
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
Copy Markdown

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