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

Moving checkCrashResources to a more appropriate place #445

Merged
merged 2 commits into from
Apr 30, 2016

Conversation

william-ferguson-au
Copy link
Member

Namely to ConfigurationBuilder#build()

@F43nd1r
Copy link
Member

F43nd1r commented Apr 28, 2016

Maybe ACRAConfigurationException could be a Runtime exception? This maintains best backwards compatibility. This exception should never be seen in production anyway, requiring users to always handle it seems like the wrong thing to me.

@william-ferguson-au
Copy link
Member Author

No, we can't make it a RuntimeException.
One thing that a crash handler can't do is to crash itself.

We have to make it so that ACRA logs loudly that it has been misconfigured and is not running, but lets the app proceed.

@F43nd1r
Copy link
Member

F43nd1r commented Apr 28, 2016

One thing that a crash handler can't do is to crash itself.

That sounds reasonable, but then why are there exceptions in getConfig and getSharedPreferences?

Next idea: throw exception in build(). Pass ConfigurationBuilder to init instead of ACRAConfiguration. This way we can have just one try/catch block showing a reasonable warning.

@F43nd1r
Copy link
Member

F43nd1r commented Apr 28, 2016

@william-ferguson-au
Copy link
Member Author

There are unchecked Exception in getACRASharedPreferences and getConfig because it was an attempt to provide clear info \on what would otherwise have been a possibly non-intuitive NullPointerException at some future point. And also part of the reason those 2 methods are deprecated.

@william-ferguson-au william-ferguson-au merged commit 0a8cea1 into master Apr 30, 2016
@william-ferguson-au william-ferguson-au deleted the checkCrashResources branch April 30, 2016 09:35
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