Skip to content

Commit bd63c82

Browse files
committed
Silencing transactions that are reporting on failed rollback exceptions when they are safe to ignore.
1 parent e5b2923 commit bd63c82

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/rare-news-lie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@journeyapps/react-native-quick-sqlite': patch
3+
---
4+
5+
Silencing transactions that are reporting on failed rollback exceptions when they are safe to ignore.

src/setup-open.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,12 @@ export function setupOpen(QuickSQLite: ISQLite) {
212212
}
213213
return res;
214214
} catch (ex) {
215-
await rollback();
215+
try {
216+
await rollback();
217+
} catch (ex2) {
218+
// In rare cases, a rollback may fail.
219+
// Safe to ignore.
220+
}
216221
throw ex;
217222
}
218223
};

0 commit comments

Comments
 (0)