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

[Console] Render all throwables the same, including \Error subclasses#45885

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

Closed
Seldaek wants to merge1 commit intosymfony:4.4fromSeldaek:patch-14

Conversation

@Seldaek
Copy link
Member

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix #...
LicenseMIT
Doc PRsymfony/symfony-docs#...

I'm not sure why only \Exception was caught here. These should also be included and rendered nicely IMO:

Error  ArithmeticError    DivisionByZeroError  AssertionError  CompileError    ParseError  TypeError    ArgumentCountError  UnhandledMatchError  ValueError

I believe it's an omission and hence worth a bugfix, but maybe I missed something.

@Seldaek
Copy link
MemberAuthor

Seldaek commentedMar 30, 2022
edited
Loading

There is a test failure - related to#22690 - maybe@chalasr can help here. It seems rethrowing was needed in the Symfony context so the symfony/debug handlers can do their job, but when using symfony/console inside Composer for example all I end up with is an unstyled error output from the native PHP uncaught exception handler.

I worked around this incomposer/composer@af3e67e for the time being, as I wanted to render those type errors nicer, and also note I forced the stack trace to be shown for \Error (and its children) & \LogicException (not its children tho as things like InvalidArgumentException I wouldn't necessarily consider programming errors). Because getting error reports for things like type errors which are definitely program errors without stack trace is a real pain.

So feel free to close here if you think it's unreasonable, but I find the current state a slightly strange behavior for non-symfony-framework users of symfony/console.

@chalasr
Copy link
Member

Oh h*ck not this topic again 😅

derrabus reacted with laugh emoji

@chalasrchalasr reopened thisMar 30, 2022
@Seldaek
Copy link
MemberAuthor

Yes I saw there's some history there :) That's why I said it's fine for me to close as well, I could achieve what I needed to achieve on my end, so no big deal.

@chalasr
Copy link
Member

Sorry I didn't mean to close! Let me check this.

@nicolas-grekas
Copy link
Member

Closing as explained, too risky for 4.4 at least.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

4 participants

@Seldaek@chalasr@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp