Skip to content

GetFolderAsync & GetFileAsync error handling issue #197

@JackDetrick

Description

@JackDetrick

I'm using GetFolderAsync & GetFileAsync to perform application serialization and deserialization. The related coroutines require the use on non local data for storage and retrieval.
From my testing there appears no problem in reading/updating this non local data except when there is a missing file or folder. I use try/catch for GetFolderAsync and GetFileAsync., In that case the try does a throw but my catch is not called. If I remove all reference to non local data the try/catch works OK.
I'm attempting to replicate my C# UWP app's serialization and deserialization. There they are called in application startup and shutdown. For startup deserialization is called prior to the call to navigate to the mainpage.
My workaround is to use two coroutines in the deserializaton process. One (with only local data) will use the try/catch to create missing folders or files. The second will use non-local data to complete the deserialization.

Is there a better way? I feel uncomfortable with this approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions