Skip to content

Commit a9922b3

Browse files
committed
docs: fix description
All the current DB drivers throw an exception when a query error occurs. See codeigniter4#6912 MySQLi driver sets `mysqli_report(MYSQLI_REPORT_ALL & ~MYSQLI_REPORT_INDEX)` that throws mysqli_sql_exception. SQLite3 and Postgres drivers throw ErrorException because of Error Handler. SQLSRV driver has different implementaion. It throws DatabaseException when the query return value is false.
1 parent bd76d9a commit a9922b3

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

user_guide_src/source/database/transactions.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ or failure of any given query.
4848
.. note:: Since v4.3.0, ``DBDebug`` is true by default in all environments.
4949
When ``DBDebug`` is true, if a query error occurs, all the queries
5050
will be rolled backed, and an exception will be thrown.
51-
In previous versions, ``DBDebug`` was false in production environment,
52-
and different database drivers might throw different exception classes
53-
or did not throw exceptions.
51+
In previous versions, ``DBDebug`` was false only in production environment,
52+
and different database drivers might throw different exception classes.
5453

5554
Strict Mode
5655
===========
@@ -68,9 +67,8 @@ Strict Mode can be disabled as follows:
6867
.. note:: Since v4.3.0, ``DBDebug`` is true by default in all environments.
6968
When ``DBDebug`` is true, if a query error occurs, all the queries
7069
will be rolled backed, and an exception will be thrown.
71-
In previous versions, ``DBDebug`` was false in production environment,
72-
and different database drivers might throw different exception classes
73-
or did not throw exceptions.
70+
In previous versions, ``DBDebug`` was false only in production environment,
71+
and different database drivers might throw different exception classes.
7472

7573
.. _transactions-managing-errors:
7674

@@ -86,9 +84,8 @@ you'll see an exception thrown if the commit was unsuccessful. If
8684
.. note:: Since v4.3.0, ``DBDebug`` is true by default in all environments.
8785
When ``DBDebug`` is true, if a query error occurs, all the queries
8886
will be rolled backed, and an exception will be thrown.
89-
In previous versions, ``DBDebug`` was false in production environment,
90-
and different database drivers might throw different exception classes
91-
or did not throw exceptions.
87+
In previous versions, ``DBDebug`` was false only in production environment,
88+
and different database drivers might throw different exception classes.
9289

9390
Disabling Transactions
9491
======================

0 commit comments

Comments
 (0)