OneDrive / onedrive-sdk-dotnet-msa-auth-adapter

Other
26 stars 22 forks source link

RetrieveCredentialFromVault exception not caught when .NET Native is enabled #15

Closed ericpapamarcos closed 7 years ago

ericpapamarcos commented 7 years ago

When a UWP (14393 SDK) is running in Release mode with .NET Native enabled, the exception is not caught when the vault is unable to retrieve the credential because the vault is empty.

Changing the exception type that's caught addresses the issue.

cdmayer commented 7 years ago

Can you add a new catch block with the specific type of exception that's thrown? I don't think we should catch every exception under the sun here.

ericpapamarcos commented 7 years ago

I wasn't able to tell which exception type was being thrown because .NET Native seems to suppress some info. Are you able to see the exception type on your side or have a tip for how to see it with .NET Native?

On Monday, September 26, 2016, Chris Mayer notifications@github.com wrote:

Can you add a new catch block with the specific type of exception that's thrown? I don't think we should catch every exception under the sun here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OneDrive/onedrive-sdk-dotnet-msa-auth-adapter/pull/15#issuecomment-249601775, or mute the thread https://github.com/notifications/unsubscribe-auth/AARQk_MwlKo-flljOED_gS4xP8EcDs17ks5qt-KwgaJpZM4KF9Ve .

cdmayer commented 7 years ago

Repro'd. Seems we can't do any better by looking at the exception type. Could try to compare the message, but that seems pretty fragile. I'll take as-is. Thanks for contributing!

ericpapamarcos commented 7 years ago

Great, thanks for the fast turn around! Updated NuGet package looks good.

On Mon, Sep 26, 2016 at 8:59 AM, Chris Mayer notifications@github.com wrote:

Merged #15 https://github.com/OneDrive/onedrive-sdk-dotnet-msa-auth-adapter/pull/15 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OneDrive/onedrive-sdk-dotnet-msa-auth-adapter/pull/15#event-802510251, or mute the thread https://github.com/notifications/unsubscribe-auth/AARQk6A1DYgQckBh4cq5wyZyKqjiEqP3ks5qt-vggaJpZM4KF9Ve .