Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Notifier] Allow passing a previous throwable to exceptions#42183

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@derrabus
Copy link
Member

QA
Branch?5.2
Bug fix?yes
New feature?no
Deprecations?no
TicketsN/A
LicenseMIT
Doc PRN/A

It should always be possible to pass a a previous throwable to a new exception. This PR streamlines the constructors of the Notifier component's exception classes.

kozlice reacted with thumbs up emoji
Signed-off-by: Alexander M. Turek <me@derrabus.de>
@Nyholm
Copy link
Member

You beat me with a minute =)

derrabus and OskarStark reacted with laugh emojiderrabus and kozlice reacted with rocket emoji

Copy link
Member

@NyholmNyholm left a comment

Choose a reason for hiding this comment

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

I agree to add this as a bugfix. It does not break BC:https://3v4l.org/bqFsI

* @param string[] $supported
*/
publicfunction__construct(Dsn$dsn,string$name =null,array$supported = [])
publicfunction__construct(Dsn$dsn,string$name =null,array$supported = [],\Throwable$previous =null)
Copy link
Member

Choose a reason for hiding this comment

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

Do you have a use case where this is needed?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Forbidding to chain exceptions is really a bad anti-pattern. I would simply always allow it.

Copy link
Member

Choose a reason for hiding this comment

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

Fair.

I just dont know of a situation where you would like to chain aUnsupportedSchemeException.

derrabus reacted with thumbs up emoji
@OskarStark
Copy link
Contributor

Good catch, thanks Alexander.

@OskarStarkOskarStark merged commit24ec4e0 intosymfony:5.2Jul 19, 2021
@derrabusderrabus deleted the bugfix/notifier-exception-constructors branchJuly 19, 2021 07:09
This was referencedJul 26, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@NyholmNyholmNyholm left review comments

@OskarStarkOskarStarkOskarStark approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.2

Development

Successfully merging this pull request may close these issues.

4 participants

@derrabus@Nyholm@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp