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
Bugfix/stacktrace is missing for haltable exceptions #524
Bugfix/stacktrace is missing for haltable exceptions #524
Conversation
src/Whoops/Exception/Inspector.php
Outdated
* @return array | ||
*/ | ||
protected function getTrace($e) | ||
protected function getTrace(\Throwable $e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you cant use \Throwable her it is only available in php 7.0
f4d733a
to
263ad8a
Compare
Could you add a unit test? |
…pty array when a full stack trace is available
263ad8a
to
2861a7e
Compare
Do you have any suggestions about how to unit test this as I'm not very familiar with Xdebug as well as setting up unit tests that require extensions to be installed. |
Add a unit test which reproduces the issue beeing fixed, add a "skip-condition" to not run it when xdebug is not loaded and assert via try/catch that the thrown exception will have a proper Stacktrace when provided to |
Would the following change achieve the same goal? |
Hopefully fixed in 51c2de8. |
I noticed I was missing a stack trace for a FatalThrowableError Exception that should have had one and found it was caused by returning an empty array for the stack trace due to a commit adding ability to get stack trace from xdebug for fatal errors:
c7ab118