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
We recently ran into issues when saving items which are too large or which cause the storage space to exceed the quota in total. Since the set method catches any exceptions and just prints them there is not really an easy way to handle these cases.
It'd therefore be great if the library could just throw the exceptions so the developer has access to it and could handle it using try {} catch(e) {}.
I would be happy to provide another pull request but I quickly wanted to check what implementation you would prefer. In my opinion we could simply add a new settingthrowExceptions: true which by default is false. This prevents any breaking changes.
If the setting is true simply throw any exceptions; if not just print it to the console like it's done today. Or would you rather completely switch to throwing exceptions?
The text was updated successfully, but these errors were encountered:
It would be better to throw an exception than just writing to the console. Initially, I made a mistake when I did not take this into account. Parameter is not needed. You just need to add error handling.
We recently ran into issues when saving items which are too large or which cause the storage space to exceed the quota in total. Since the
set
method catches any exceptions and just prints them there is not really an easy way to handle these cases.It'd therefore be great if the library could just throw the exceptions so the developer has access to it and could handle it using
try {} catch(e) {}
.I would be happy to provide another pull request but I quickly wanted to check what implementation you would prefer. In my opinion we could simply add a new setting
throwExceptions: true
which by default isfalse
. This prevents any breaking changes.If the setting is true simply throw any exceptions; if not just print it to the console like it's done today. Or would you rather completely switch to throwing exceptions?
The text was updated successfully, but these errors were encountered: