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

Log the full exception trace #491

Merged
merged 5 commits into from
May 5, 2021
Merged

Conversation

rmckayfleming
Copy link
Contributor

Type of PR (feature, enhancement, bug fix, etc.)

Enhancement

Description

Render the entire stack trace instead of just the top level error.

Why should this be added

Simply put, this makes debugging a lot easier especially for exceptions caused by ViewComponents. I've often run into cases where the exception comes deep from within Rails and without the full trace, it's hard to know what part of your code tripped it.

If it'd be better to gate this behaviour change behind an option or something, I'd be happy to make the change (I'd just need to know how best to handle it).

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing
  • This is not a documentation update

@leastbad
Copy link
Contributor

Hey Ryan!

I'm curious: would you be happiest if full stack traces occured:

  1. only on the server
  2. only on the client console
  3. both

I'm currently thinking that what makes the most sense is to puts the full trace and keep what the client shows short. What do you think?

@leastbad leastbad added this to the 3.4.2 milestone Apr 29, 2021
@leastbad
Copy link
Contributor

Hey again! 😀

Apologies for moving into your PR like I own the place. Straight talk: you had the right idea, but the implementation needed was closer to a refactoring of the module. I want you to retain credit and be recognized as a contributor to StimulusReflex.

Thanks for kicking things off!

@leastbad leastbad added bug Something isn't working enhancement New feature or request ruby Pull requests that update Ruby code labels Apr 30, 2021
@leastbad leastbad self-assigned this Apr 30, 2021
Copy link
Contributor

@hopsoft hopsoft left a comment

Choose a reason for hiding this comment

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

This looks good. I had one minor concern.

@leastbad leastbad merged commit 3699539 into stimulusreflex:master May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants