You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I presume this is to resolve the kind of problem which I've just seen, where I received a "Could not find key 'xyz' in the LocalStorage" exception when I attempted a Get for a key which wasn't yet populated.
I was reading your instructions and couldn't spot how I ought to be checking for a key before I attempt to get it. Is there a process which I should be using that I'm missing?
@n-alex-white Indeed. I'll be adding these operations in the upcoming version. I'm also contemplating about an additional Exists() method for the sole purpose of readability (e.g. code eloquence if you will).
ETA for the updated version is this month. Hope you can wait for this.
hanssens
changed the title
Add safe helpers for retrieval
Add safe helpers for retrieval, preventing KeyNotFoundException
Mar 22, 2017
E.g. TryGet() and TryQuery().
The text was updated successfully, but these errors were encountered: