Skip to content

Commit 8417334

Browse files
committed
Use ClosedException.
1 parent eef16ad commit 8417334

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/connection_pool.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class SqliteConnectionPool with SqliteQueries implements SqliteConnection {
5353
@override
5454
Future<bool> getAutoCommit() async {
5555
if (_writeConnection == null) {
56-
throw AssertionError('Closed');
56+
throw ClosedException();
5757
}
5858
return await _writeConnection!.getAutoCommit();
5959
}
@@ -118,7 +118,7 @@ class SqliteConnectionPool with SqliteQueries implements SqliteConnection {
118118
Future<T> writeLock<T>(Future<T> Function(SqliteWriteContext tx) callback,
119119
{Duration? lockTimeout, String? debugContext}) {
120120
if (closed) {
121-
throw AssertionError('Closed');
121+
throw ClosedException();
122122
}
123123
if (_writeConnection?.closed == true) {
124124
_writeConnection = null;

0 commit comments

Comments
 (0)