-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: do not throw exceptions during transactions by default #6917
feat: do not throw exceptions during transactions by default #6917
Conversation
2ca5a70
to
fb5e3e7
Compare
13ddde2
to
b05af11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handling transactions with exceptions is not easy. Our current approach with transStatus()
seems to be more natural.
Co-authored-by: sclubricants <[email protected]>
Co-authored-by: MGatner <[email protected]>
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, Postgres and OCI8 drivers throw ErrorException because of Error Handler. SQLSRV driver has different implementaion. It throws DatabaseException when the query return value is false.
b05af11
to
0308366
Compare
Rebased, and this PR is ready. @codeigniter4/database-team Please review. |
I guess that breaking change is valid only for development mode? CI 4.3 wasn't released yet. |
This breaking change is only when |
Okay, so the impact is minimal. |
Needs #6919Supersedes #6886
Description
$db->transException(true)
to throw exceptionsRef: #6909
Checklist: