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

allow forcing backtrace to print in exceptiontotextprocessor #17369

Merged
merged 5 commits into from Mar 25, 2021

Conversation

diosmosis
Copy link
Member

Description:

Allow forcing the backtrace to print in ExceptionToTextProcessor + a fix: remove the redundant message that gets printed when including the backtrace. The processor printed the message + the stack trace, but the stack trace includes the messages of all exceptions, so it's redundant. We could also always use the result of getMessageAndWholeBacktrace(), but I didn't want to change that much code for a small change.

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@diosmosis diosmosis added the Needs Review PRs that need a code review label Mar 22, 2021
@diosmosis diosmosis added this to the 4.3.0 milestone Mar 22, 2021
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

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

The code itself looks good.
@diosmosis could you have a look at the method getMessageAndWholeBacktrace? I'm wondering if it is on purpose that the message actually is not included if $exception is given as array. Not sure when that is the case, but imho it should also include the message in that case, right?

@diosmosis
Copy link
Member Author

I remember, that was to keep it backwards compatible w/ some uses, probably fatal error reporting. I'll take a look.

@diosmosis
Copy link
Member Author

Can't see an array ever being used w/ this method, so I'm just going to change it and see if any tests fail. Worst case, the message may get printed out twice in some rare circumstances, so I think it's ok.

@sgiehl
Copy link
Member

sgiehl commented Mar 23, 2021

@diosmosis there are various log related tests failing

@diosmosis diosmosis merged commit b1bb297 into 4.x-dev Mar 25, 2021
@diosmosis diosmosis deleted the exception-to-text-force-backtrace branch March 25, 2021 18:38
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants