Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

[Enhancement] Exception types do not match intended target #1419

Closed
Mrnikbobjeff opened this issue Oct 5, 2020 · 1 comment
Closed

[Enhancement] Exception types do not match intended target #1419

Mrnikbobjeff opened this issue Oct 5, 2020 · 1 comment
Labels
enhancement Small enhancement to the library

Comments

@Mrnikbobjeff
Copy link
Contributor

Currently we throw PlatformNotSupportedExceptions with a message, when we have a self declared exception type which is already used for this scenario. PlatformNotSupportedException is declared in System.Runtime.Serialization which simply adds namespace clutter and confusing docs, as that exception should not be used in our scenario. Docs:

    // Summary:
    //     Provides Microsoft.Win32.RegistryKey objects that represent the root keys in
    //     the Windows registry, and static methods to access key/value pairs.

Instead we should throw a NotImplementedException with a message as we already do in a couple of places. This is probably best adressed in a a larger exception handling project as #1415 and #963 as well as #457 relate to this.

@Mrnikbobjeff Mrnikbobjeff added the bug Something isn't working label Oct 5, 2020
@jamesmontemagno jamesmontemagno added enhancement Small enhancement to the library and removed bug Something isn't working labels Dec 2, 2020
@jamesmontemagno jamesmontemagno changed the title [Bug] Exception types do not match intended target [Enhancement] Exception types do not match intended target Dec 2, 2020
@jfversluis
Copy link
Member

Thanks for this suggestion! As Xamarin.Essentials is now in maintenance mode, this will not happen anymore for Xamarin.Essentials. We're only adding bugfixes and stability fixes.

If this is still important to you, make sure to check the .NET MAUI repo and see if it's already on the roadmap. If not, feel free to open a discussion to discuss a change first or open an issue with a detailed feature request. Thanks!

@jfversluis jfversluis closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Small enhancement to the library
Projects
None yet
Development

No branches or pull requests

3 participants