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

Set backtrace on error object and check Piwik_ShouldPrintBackTraceWithMessage() #13450

Merged
merged 3 commits into from Sep 20, 2018

Conversation

diosmosis
Copy link
Member

… in controller instead of FrontController in case plugins decide to create their own safemode.

…hMessage() in controller instead of FrontController in case plugins decide to create their own safemode.
@diosmosis diosmosis added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Sep 19, 2018
@diosmosis diosmosis added this to the 3.6.1 milestone Sep 19, 2018
@@ -316,7 +316,9 @@ public function safemode($lastError = array())

$errorMessage = $lastError['message'];

if (!empty($lastError['backtrace'])) {
if (!empty($lastError['backtrace'])
Copy link
Member

Choose a reason for hiding this comment

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

@diosmosis is it on purpose that this is only done when output format is not HTML? I wonder if it is supposed to be shown on the safemode page when backtrace with message is enabled? I think before it was the case

Copy link
Member Author

Choose a reason for hiding this comment

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

AFAIK there was no backtrace to display in the code before (but I never paid that much attention to the safemode html).

Copy link
Member Author

Choose a reason for hiding this comment

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

I can display it in the View as well.

@diosmosis
Copy link
Member Author

Added to safemode view:

image

w/o exception:

image

Slight change in the second image since the backtrace contains the "in ... line ...".

@tsteur
Copy link
Member

tsteur commented Sep 19, 2018

LGTM if tests pass

@diosmosis diosmosis merged commit 0fa9622 into 3.x-dev Sep 20, 2018
@diosmosis diosmosis deleted the last-error-backtrace branch September 20, 2018 19:59
diosmosis added a commit that referenced this pull request Sep 20, 2018
…hMessage() (#13450)

* Set backtrace on error object and check Piwik_ShouldPrintBackTraceWithMessage() in controller instead of FrontController in case plugins decide to create their own safemode.

* Add backtrace to HTML safemode view too.

* Fixing test.
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
…hMessage() (matomo-org#13450)

* Set backtrace on error object and check Piwik_ShouldPrintBackTraceWithMessage() in controller instead of FrontController in case plugins decide to create their own safemode.

* Add backtrace to HTML safemode view too.

* Fixing test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants