[RTM] Fix issue #1376 - catch db error on bootup#1378
Merged
stefanheimes merged 1 commit intohotfix/2.1.9from Apr 2, 2020
Merged
[RTM] Fix issue #1376 - catch db error on bootup#1378stefanheimes merged 1 commit intohotfix/2.1.9from
stefanheimes merged 1 commit intohotfix/2.1.9from
Conversation
When there has been an error checking the tables on bootup, the exception was not being catched. Instead it broke the whole install process due to the newly added migrations.
dmolineus
approved these changes
Mar 11, 2020
| $this->logger->error('MetaModels startup interrupted. Not all MetaModels tables have been created.'); | ||
| return; | ||
| } | ||
| } catch (\Throwable $throwable) { |
Contributor
There was a problem hiding this comment.
Any reason silencing \Throwable and not only Doctrine\DBAL\DBALException?
Member
Author
There was a problem hiding this comment.
No serious reason, aside from the fact that we want to interrupt booting entirely when anything here goes wrong.
We already did so in Contao 3, as there were multiple reasons where we would want to abstain.
I do not know what the upcoming changes in doctrine will bring, as they are removing the single common repo and therefore thought it could be wise to simply abstain on all errornous situations.
richardhj
approved these changes
Mar 23, 2020
Member
richardhj
left a comment
There was a problem hiding this comment.
LGTM with catchin Throwable
baumannsven
approved these changes
Mar 23, 2020
stefanheimes
approved these changes
Mar 23, 2020
Contributor
|
@stefanheimes pls merge and tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When there has been an error checking the tables on bootup, the
exception was not being catched. Instead it broke the whole install
process due to the newly added migrations.
Checklist