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've been having a problem when dealing with a store failing to open. I want to a) get the error message and b) know it's an error. At the moment a failure to open a store returns a string. I could test the type that is returned but I feel it's quite clunky and a bit old skool. To me the options are:
Don't catch the error
Use some sort of Either type
Log the error and return nil
Currently I think I would prefer to not catch the error; opening the store is something that I would expect to be done quite early on, for example I open a store in my main method. I would be happy to catch the Exception along with any other possibles as I start my program as it is a fatal error. What do you think? Let me know and I can create a PR.
The text was updated successfully, but these errors were encountered:
Hi,
I've been having a problem when dealing with a store failing to open. I want to a) get the error message and b) know it's an error. At the moment a failure to open a store returns a string. I could test the type that is returned but I feel it's quite clunky and a bit old skool. To me the options are:
Currently I think I would prefer to not catch the error; opening the store is something that I would expect to be done quite early on, for example I open a store in my main method. I would be happy to catch the Exception along with any other possibles as I start my program as it is a fatal error. What do you think? Let me know and I can create a PR.
The text was updated successfully, but these errors were encountered: