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

Throw only specialized package-only exceptions #725

Merged
merged 1 commit into from Jun 5, 2018

Conversation

Majkl578
Copy link
Contributor

@Majkl578 Majkl578 commented Jun 5, 2018

Q A
Type improvement
BC Break no

Summary

Stop throwing around SPL exceptions, only throw our own.

BC is kept through inheritance.


namespace Doctrine\Migrations\Finder\Exception;

interface FInderException
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

case issue

return new self(sprintf(
'Cannot load a migrations with the name "%s" because it is a reserved number by Doctrine Migrations.'
. PHP_EOL
. "It's used to revert all migrations including the first one.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, and simple quotes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@greg0ire Some of the messages would indeed benefit from rewording, mind to send a PR? ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

@jwage jwage merged commit bba2123 into doctrine:master Jun 5, 2018
@jwage jwage added this to the 2.0 milestone Jun 5, 2018
@Majkl578 Majkl578 deleted the specialized-exceptions branch June 5, 2018 22:15
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.

None yet

3 participants