Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ErrorHandler] [ErrorHander] Display exception properties in the HTML error page #49620

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

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Mar 6, 2023

Q A
Branch? 6.3
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #49613
License MIT
Doc PR

image


Code to reproduce
class MyException extends \Exception
{
    public function __construct()
    {
        parent ::__construct('some_message', 0, new MyException2());
    }

    public string $myMessage = 'some_message';
    public string $myCode = 'some_code';
    private string $privateStuff = 'private_stuff';
}

class MyException2 extends \Exception
{
    private string $anotherPrivateStuff = 'another_private_stuff';
}

@lyrixx lyrixx requested a review from yceruto as a code owner March 6, 2023 17:37
@carsonbot carsonbot added this to the 6.3 milestone Mar 6, 2023
@lyrixx lyrixx force-pushed the error-handler-exception branch 2 times, most recently from 918dac3 to 078eef1 Compare March 6, 2023 18:19
@WebMamba
Copy link
Contributor

WebMamba commented Mar 7, 2023

What do you think about adding a new tab? And not be overwelled by too much information on the page load, but we can still access those informations easily.

Copy link
Member

@yceruto yceruto left a comment

Choose a reason for hiding this comment

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

LGTM as is, thanks for this improvement!

@lyrixx
Copy link
Member Author

lyrixx commented Mar 7, 2023

What do you think about adding a new tab?

I think it does not deserves it, and it's really tied to exceptions.

Copy link
Member

@welcoMattic welcoMattic left a comment

Choose a reason for hiding this comment

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

Thank you @lyrixx 👍

@fabpot fabpot force-pushed the error-handler-exception branch from 078eef1 to b041d06 Compare March 13, 2023 19:20
@fabpot
Copy link
Member

fabpot commented Mar 13, 2023

Thank you @lyrixx.

@fabpot fabpot merged commit b0054f6 into symfony:6.3 Mar 13, 2023
@lyrixx lyrixx deleted the error-handler-exception branch March 13, 2023 21:00
@carsonbot carsonbot changed the title [ErrorHander] Display exception properties in the HTML error page [ErrorHandler] [ErrorHander] Display exception properties in the HTML error page Mar 19, 2023
nicolas-grekas added a commit that referenced this pull request Mar 20, 2023
…and fix serializing FlattenException (nicolas-grekas)

This PR was merged into the 6.3 branch.

Discussion
----------

[ErrorHandler] Rewrite logic to dump exception properties and fix serializing FlattenException

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

The implementation in #49620 was flawed. This fixes it.

/cc `@lyrixx` FYI

Commits
-------

b5fbe18 [ErrorHandler] Rewrite logic to dump exception properties and fix serializing FlattenException
@fabpot fabpot mentioned this pull request May 1, 2023
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.

[ErrorHandler] Display more information about the current exception
7 participants