When inserting in db, the Transaction uses SQLLiteDatabase.insert() method, so Transaction returns -1 if any errors occured. It might be interesting to replace it by SQLLiteDatabase.insertOrThrow() which is the same but without catching SQLException.
Replacing it could be dangerous for current Sprinkles users when it comes to upgrade. It should be more clever to provide an alternative way of saving the Transaction.
It should be helpful in case you want to figure out the origin of an error in production as Log.e() is unusable.
Hi there,
When inserting in db, the
Transaction
usesSQLLiteDatabase.insert()
method, soTransaction
returns-1
if any errors occured. It might be interesting to replace it bySQLLiteDatabase.insertOrThrow()
which is the same but without catchingSQLException
.Replacing it could be dangerous for current Sprinkles users when it comes to upgrade. It should be more clever to provide an alternative way of saving the
Transaction
.It should be helpful in case you want to figure out the origin of an error in production as
Log.e()
is unusable.