Skip to content

Conversation

jasonmccreary
Copy link
Contributor

@jasonmccreary jasonmccreary commented Oct 15, 2025

As an OG PHP developer, my brain is trained to parse the exception for a file reference and line number. I was surprised not the see it in the new exception page.

While this does exist on the page, it can be "below the fold". In addition, that file reference is discerned from the stack trace and may not match the "thrown" exception.

This PR adds a clickable file reference for the "thrown" exception. I'm no designer. But I tried to follow the styling found on the rest of the page, while not introducing clutter.

Screenshot 2025-10-15 at 12 32 56 PM

This also includes an optimization to memoize the exception frames calculation using once(). This is a relatively expensive operation and this method was already called from multiple components. I've done so in an atomic commit, so it is easily reverted with: git revert 35a2fa0

@jasonmccreary jasonmccreary changed the title Add clickable file reference to base exception Add clickable file reference for thrown exception Oct 15, 2025
@taylorotwell taylorotwell merged commit 8b505fa into laravel:12.x Oct 15, 2025
68 of 69 checks passed
@jasonmccreary jasonmccreary deleted the exception-file-line branch October 15, 2025 23:33
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