[Feature/Developer] StorageFramework wrap Save() and Load() methods #49
Labels
enhancement
Request for a new feature or improvement of something
essential
Features that are essential for the bot
good first issue
Good for newcomers
Is your feature request related to a problem? Please describe.
Currently, the Save() and Load() methods are not wrapped by the abstract StorageService class. Same for the async variant.
A storage itself can't throw an exception on Save() and Load(), so as long as nothing else is done in the service's Save() and Load() implementation, this can't throw an exception either. However, if any additional code is needed for the implementation's Save() and Load() methods and that code throws an exception, it will cause the foreach loop of SaveAll() and LoadAll() to break and the exception will not be handled.
Describe the solution you'd like
Rename Save() and Load() to DoSave() and DoLoad() in StorageService.
Implement new Save() and Load() methods which wrap the DoSave() and DoLoad() methods and use try/catch.
Feature type
The text was updated successfully, but these errors were encountered: