-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Throw exceptions on SQL errors #18151
Throw exceptions on SQL errors #18151
Conversation
1c82c4a
to
f79da9f
Compare
f79da9f
to
08d23ff
Compare
E2E tests are failing due to the SQL error reported in #18175. |
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.
With these changes, should Toolbox::logSqlError()
and the associated sql-errors.log
file be depreciated/removed ?
With the new exception, SQL errors end up directly in the php-errors-log
file.
I don't see a use case for manually calling Toolbox::logSqlError()
.
|
Any reason this one is still draft, or should me merge (e2e error is not a blocker)? |
The e2e tests fails due to an SQL error that is now blocking, see #18175. We have to fix this SQL error before being able to merge the current PR. |
08d23ff
to
d7de9a6
Compare
d7de9a6
to
24d2593
Compare
24d2593
to
be96238
Compare
I added a commit to quickly adapt the install/update process. |
Checklist before requesting a review
Description
Since we did not have a centralized error catching in the past, we were not able to throw exceptions when a SQL error occurred. They were just logged and were not stopping the code execution, and this could have the effect of triggering hard-to-debug errors in subsequently executed code.
Now we have a centralized error catching system, we can throw exceptions when a SQL error is triggered. It would result in displaying the error page. For instance, if I force a SQL querry error in the impact analysis tab:
![image](https://private-user-images.githubusercontent.com/33253653/381062636-fa2878a6-17ef-459a-b80d-83eb3778b154.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjE1NjYsIm5iZiI6MTczOTU2MTI2NiwicGF0aCI6Ii8zMzI1MzY1My8zODEwNjI2MzYtZmEyODc4YTYtMTdlZi00NTlhLWI4MGQtODNlYjM3NzhiMTU0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE5Mjc0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkMTUwOTI4YTM3MmNiNzgzZDFlYTRmMGQ4ZmQzNjllZTA2OTE4ZDAyYTA5Njg5ZGFiNWRlYzI5MTliYWMyMDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.16oQ4GZfe2mHbNfx8JOxoFdiWB2PniC4ycXSUMx_SsA)