Skip to content
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

Stop swallowing exceptions #8962

Merged
merged 1 commit into from
Aug 29, 2021

Conversation

greg0ire
Copy link
Member

This was probably done in order to get rid of exceptions about tables
already existing, but may and does swallow other exceptions as well, for
instance exceptions about sequences failing to be created on Oracle
because the identifier is too long. This makes it unnecessarily hard to
understand what is going on.

This was probably done in order to get rid of exceptions about tables
already existing, but may and does swallow other exceptions as well, for
instance exceptions about sequences failing to be created on Oracle
because the identifier is too long. This makes it unnecessarily hard to
understand what is going on.
@greg0ire greg0ire merged commit d5f65ba into doctrine:2.10.x Aug 29, 2021
@greg0ire greg0ire deleted the dont-swallow-exceptions branch August 29, 2021 18:55
@greg0ire greg0ire added this to the 2.10.0 milestone Aug 29, 2021
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.

Also, it turns out that swallowing exceptions is really the way to go
here, because of the performance implication of calling dropSchema(). It
is possible to catch a more precise exception though, which should
preserve the benefits of not swallowing them.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.

Also, it turns out that swallowing exceptions is really the way to go
here, because of the performance implication of calling dropSchema(). It
is possible to catch a more precise exception though, which should
preserve the benefits of not swallowing them.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.

It looks like I based my grep on the comment inside. Today, I found many
other occurrences of this pattern, without the easy to grep comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.

Also, it turns out that swallowing exceptions is really the way to go
here, because of the performance implication of calling dropSchema(). It
is possible to catch a more precise exception though, which should
preserve the benefits of not swallowing them.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.
As it turns out however, swallowing exceptions is really the way to go
here, because of the performance implication of calling dropSchema(). It
is possible to catch a more precise exception as well, which should
preserve the benefits of not swallowing them.

It looks like I based my grep on the comment inside the catch and today,
I found many other occurrences of this pattern, without the easy to grep
comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 19, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.
As it turns out however, swallowing exceptions is really the way to go
here, because of the performance implication of calling dropSchema(). It
is possible to catch a more precise exception as well, which should
preserve the benefits of not swallowing them.

It looks like I based my grep on the comment inside the catch and today,
I found many other occurrences of this pattern, without the easy to grep
comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Feb 20, 2022
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.
As it turns out however, swallowing exceptions is really the way to go
here, because of the performance implication of calling dropSchema(). It
is possible to catch a more precise exception as well, which should
preserve the benefits of not swallowing them.

It looks like I based my grep on the comment inside the catch and today,
I found many other occurrences of this pattern, without the easy to grep
comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants