Skip to content

Add exception handling breaking change #18026

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
merged 1 commit into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/core/compatibility/corefx.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The following breaking changes are documented on this page:
| [Change in default value of UseShellExecute](#change-in-default-value-of-useshellexecute) | 2.1 |
| [OpenSSL versions on macOS](#openssl-versions-on-macos) | 2.1 |
| [UnauthorizedAccessException thrown by FileSystemInfo.Attributes](#unauthorizedaccessexception-thrown-by-filesysteminfoattributes) | 1.0 |
| [Handling corrupted-process-state exceptions is not supported](#handling-corrupted-state-exceptions-is-not-supported) | 1.0 |

## .NET Core 3.0

Expand Down Expand Up @@ -107,3 +108,7 @@ The following breaking changes are documented on this page:
[!INCLUDE [UnauthorizedAccessException thrown by FileSystemInfo.Attributes](~/includes/core-changes/corefx/1.0/filesysteminfo-attributes-exceptions.md)]

***

[!INCLUDE [corrupted-state-exceptions](~/includes/core-changes/corefx/1.0/corrupted-state-exceptions.md)]

***
5 changes: 5 additions & 0 deletions docs/core/compatibility/fx-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ If you're migrating an app from .NET Framework to .NET Core, the breaking change

- [Change in default value of UseShellExecute](#change-in-default-value-of-useshellexecute)
- [UnauthorizedAccessException thrown by FileSystemInfo.Attributes](#unauthorizedaccessexception-thrown-by-filesysteminfoattributes)
- [Handling corrupted-process-state exceptions is not supported](#handling-corrupted-state-exceptions-is-not-supported)

### .NET Core 2.1

Expand All @@ -28,6 +29,10 @@ If you're migrating an app from .NET Framework to .NET Core, the breaking change

***

[!INCLUDE [corrupted-state-exceptions](~/includes/core-changes/corefx/1.0/corrupted-state-exceptions.md)]

***

## Cryptography

- [Boolean parameter of SignedCms.ComputeSignature is respected](#boolean-parameter-of-signedcmscomputesignature-is-respected)
Expand Down
34 changes: 34 additions & 0 deletions includes/core-changes/corefx/1.0/corrupted-state-exceptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
### Handling corrupted state exceptions is not supported

Handling corrupted-process-state exceptions in .NET Core is not supported.

#### Change description

Previously, corrupted-process-state exceptions could be caught and handled by managed code exception handlers, for example, by using a [try-catch](../../../../docs/csharp/language-reference/keywords/try-catch.md) statement in C#.

Starting in .NET Core 1.0, corrupted-process-state exceptions cannot be handled by managed code. The common language runtime doesn't deliver corrupted-process-state exceptions to managed code.

#### Version introduced

1.0

#### Recommended action

Avoid the need to handle corrupted-process-state exceptions by addressing the situations that lead to them instead. If it's absolutely necessary to handle corrupted-process-state exceptions, write the exception handler in C or C++ code.

#### Category

Core .NET libraries

#### Affected APIs

- <xref:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute?displayProperty=fullName>
- [legacyCorruptedStateExceptionsPolicy element](~/docs/framework/configure-apps/file-schema/runtime/legacycorruptedstateexceptionspolicy-element.md)

<!--

#### Affected APIs

- `T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute`

-->