dotnet / dotnet/wcf

Consider changing base class of CommunicationException to SystemException

Open
#4,250 2 comments 0 reactions 1 assignee Claimed by @mconnew View on GitHub
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

CommunicationException derives from SystemException on .NET Framework. This was only introduced into netstandard2.0 so we had to switch to deriving from Exception. This has the consequence that the HResult value is different for CommunicationException and derived types between .NET Core and .NET Framework. On Framework, the HResult is COR_E_EXCEPTION (-2146233088), on Core, the HResult is COR_E_SYSTEM (-2146233087). This causes a difference in how FaultException is serialized.
We need to decide if we want to switch CommunicationException back to being derived from SystemException now it's available and discuss the compat implications.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.