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

Not relying on exception for program flow #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

redsolo
Copy link

@redsolo redsolo commented Apr 13, 2015

If I run our application with the library and would like to catch all
exceptions not only those unhandled; then the Restore method will always
throw an exception (if there id no file). With this change it will check
if it exists and then return the default if it didnt exist. There is no
need to try to read the stream from the file because it will not be
there.

If I run our application with the library and would like to catch all
exceptions not only those unhandled; then the Restore method will always
throw an exception (if there id no file). With this change it will check
if it exists and then return the default if it didnt exist. There is no
need to try to read the stream from the file because it will not be
there.
I would like to be able to set the base folder path to our
application's local app data folder. Otherwise the files will not be
removed when our application is removed.  Since the method is public but
the class is only internal, I made the class public.

I know that we discussed that the default implementation could use the
product name, etc. But this doesnt help because my code is loaded by a
third party application, so that means that the files will be named like
the application and not base on our codebase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants