Skip to content

Commit cd3d0a7

Browse files
committed
docs: add notes for DBDebug
1 parent aa45f5c commit cd3d0a7

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

user_guide_src/source/database/transactions.rst

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ You can run as many queries as you want between the start/complete
4545
functions and they will all be committed or rolled back based on the success
4646
or failure of any given query.
4747

48+
.. note:: Since v4.3.0, ``DBDebug`` is true by default in all environments.
49+
When ``DBDebug`` is true, if an query error occurs, all the queries
50+
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.
54+
4855
Strict Mode
4956
===========
5057

@@ -58,6 +65,13 @@ Strict Mode can be disabled as follows:
5865

5966
.. literalinclude:: transactions/002.php
6067

68+
.. note:: Since v4.3.0, ``DBDebug`` is true by default in all environments.
69+
When ``DBDebug`` is true, if an query error occurs, all the queries
70+
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.
74+
6175
Managing Errors
6276
===============
6377

@@ -67,9 +81,12 @@ you'll see an exception thrown if the commit was unsuccessful. If
6781

6882
.. literalinclude:: transactions/003.php
6983

70-
.. note:: Since v4.3.0, ``DBDebug`` is true by default. In previous versions,
71-
it was false in production environment, and different database drivers might
72-
throw different exception classes or did not throw exceptions.
84+
.. note:: Since v4.3.0, ``DBDebug`` is true by default in all environments.
85+
When ``DBDebug`` is true, if an query error occurs, all the queries
86+
will be rolled backed, and an exception will be thrown.
87+
In previous versions, ``DBDebug`` was false in production environment,
88+
and different database drivers might throw different exception classes
89+
or did not throw exceptions.
7390

7491
Disabling Transactions
7592
======================

0 commit comments

Comments
 (0)