Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4cc641f5 authored by Lee Shombert's avatar Lee Shombert
Browse files

Fine-tune sqlite misuse exceptions

The baseline code throws a "column-out-of-bounds" exception for some
APIs, where the bounds are determined by the sqlite statement.
However, this exception is misleading if the real problem is that the
statement is not properly prepared.  The code change executes the
desired sqlite api and throws an error if one is detected.  If no
error is detected but the column is out of bounds, the
column-out-of-bounds exception is thrown.

Note that this change does not throw an exception when one would not
have been thrown before.  It only changes the exception that is
thrown.

Flag: EXEMPT bug-fix
Bug: 359676342
Test: atest
 * FrameworksCoreTests:android.database
 * CtsDatabaseTestCases
Change-Id: Ic85982aeff680b19dedd14460cb26ba5b5ce18ed
parent 9176f4a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment