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

insertOrThrow to provide information about errors #355

wants to merge 1 commit into
base: master


None yet
1 participant

nscherer commented Apr 4, 2015

Currently if an insert fails, the developer is left guessing as to why. If AA used insertOrThrow instead, there would be information about what happened. If an app is relying on the current relatively silent failure of inserts, it may crash after this update. The unfortunate thing is the exception thrown will be a runtime exception, so the compiler will not inform the dev that he needs to change anything. However, I would argue that it's worth the risk to give developers the information they need to produce correct apps. Currently I have a "debug save" version of the method that doesn't actually do everything a save operation needs to do, but at least tells me what's going wrong with an insert. So if I find a problem with an insert I have to switch to the debug method, and then switch back after fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment