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

[3.x] Ability to review Exception context data #882

Merged
merged 4 commits into from
Apr 28, 2020
Merged

[3.x] Ability to review Exception context data #882

merged 4 commits into from
Apr 28, 2020

Conversation

crynobone
Copy link
Member

@crynobone crynobone commented Apr 28, 2020

Current behaviour

When developer use custom report and log an error manually using the following:

<?php

namespace App\Exceptions;

class TestException extends \Exception
{
    public function report()
    {
        \Log::error($this->getMessage(), [
            'message' => 'Context message here',
            'path' => base_path(),
            'exception' => $this,
        ]);
    }
}

We should be able to see the custom context. However at the moment only message, location and stacktrace can be reviewed from Telescope.

Screenshot 2020-04-18 at 7 34 23 AM

Excepted Behaviour

Exception without any custom context should remain the same as before.

image

Exception with custom context should be able to show the context.

image

Solves #875

@driesvints driesvints changed the title Ability to review Exception context data [3.x] Ability to review Exception context data Apr 28, 2020
@taylorotwell taylorotwell merged commit 61f55f2 into laravel:3.x Apr 28, 2020
@taylorotwell
Copy link
Member

Thanks

@crynobone crynobone deleted the exception-context branch February 17, 2021 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants