Skip to content

Commit 756a7eb

Browse files
Further adjust thrown exceptions
1 parent ac7d1e3 commit 756a7eb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/NHibernate/Driver/DriverBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ protected virtual void OnBeforePrepare(DbBatch batch)
351351

352352
public virtual DbBatch CreateBatch()
353353
{
354-
throw new NotImplementedException();
354+
throw new NotSupportedException();
355355
}
356356

357357
public virtual bool CanCreateBatch => false;

src/NHibernate/Driver/IDriveConnectionCommandProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public interface IDriveConnectionCommandProvider
88
DbConnection CreateConnection();
99
DbCommand CreateCommand();
1010
#if NET6_0_OR_GREATER
11-
DbBatch CreateBatch() => throw new NotImplementedException();
11+
DbBatch CreateBatch() => throw new NotSupportedException();
1212
bool CanCreateBatch => false;
1313
#endif
1414
}

src/NHibernate/Transaction/AdoTransaction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void Enlist(DbCommand command)
8181

8282
// If you try to assign a disposed transaction to a command with MSSQL, it will leave the command's
8383
// transaction as null and not throw an error. With SQLite, for example, it will throw an exception
84-
// here instead. Because of this, we set the trans field to null in when Dispose is called.
84+
// here instead. Because of this, we set the trans field to null when Dispose is called.
8585
command.Transaction = trans;
8686
}
8787
}
@@ -132,7 +132,7 @@ public void Enlist(DbBatch batch)
132132

133133
// If you try to assign a disposed transaction to a command with MSSQL, it will leave the command's
134134
// transaction as null and not throw an error. With SQLite, for example, it will throw an exception
135-
// here instead. Because of this, we set the trans field to null in when Dispose is called.
135+
// here instead. Because of this, we set the trans field to null when Dispose is called.
136136
batch.Transaction = trans;
137137
}
138138
}

0 commit comments

Comments
 (0)