Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature/Developer] StorageFramework wrap Save() and Load() methods #49

Open
Kitt3120 opened this issue Jul 25, 2022 · 0 comments
Open
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

Comments

@Kitt3120
Copy link
Owner

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

  • Service
@Kitt3120 Kitt3120 added enhancement Request for a new feature or improvement of something good first issue Good for newcomers essential Features that are essential for the bot labels Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant