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

Commit 596d8a2e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Ignore exceptions when investigating failure reasons" into rvc-dev am: d907c494

Change-Id: I253f0e45b932a2fdbd5f360611a9929b4a2ed216
parents 87058629 d907c494
Loading
Loading
Loading
Loading
+20 −13
Original line number Diff line number Diff line
@@ -228,6 +228,10 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
        } catch (SQLiteCantOpenDatabaseException e) {
            String message = String.format("Cannot open database '%s'", file);

            try {
                // Try to diagnose for common reasons. If something fails in here, that's fine;
                // just swallow the exception.

                final Path path = FileSystems.getDefault().getPath(file);
                final Path dir = path.getParent();

@@ -242,6 +246,9 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
                } else {
                    message += ": Unknown reason";
                }
            } catch (Throwable th) {
                message += ": Unknown reason; cannot examine filesystem: " + th.getMessage();
            }
            throw new SQLiteCantOpenDatabaseException(message, e);
        } finally {
            mRecentOperations.endOperation(cookie);