Skip to content

Commit 4fb573b

Browse files
committed
fix: handle errors in sync executeBatch
1 parent 96fb734 commit 4fb573b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

package/src/DatabaseQueue.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,9 @@ export function startOperationSync<
117117

118118
// Execute synchronously
119119
databaseQueue.inProgress = true
120-
const result = callback()
121-
databaseQueue.inProgress = false
122-
123-
return result
120+
try {
121+
return callback()
122+
} finally {
123+
databaseQueue.inProgress = false
124+
}
124125
}

0 commit comments

Comments
 (0)