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

Fix #3503: prints exception variable contents #3504

Merged
merged 1 commit into from
Aug 31, 2017
Merged

Fix #3503: prints exception variable contents #3504

merged 1 commit into from
Aug 31, 2017

Conversation

kylethebaker
Copy link
Contributor

There are other approaches here, but this is the most straightforward. Initially I was using Error::renderExceptionSafe which will render the exception into a string, but it contains html markup which doesn't play nice with console. The markup can then be passed to Drupal\Component\Render\PlainTextOutput::renderFromHtml which will strip the tags. But ultimately it's just a round about way to accomplish what I have here.

_drupal_log_exception uses strtr so I took inspiration from there. If there is a more "drupal" way to render the exception contents into a plaintext string then that might be better.

@kylethebaker kylethebaker changed the title Fix #3505: prints exception variable contents Fix #3503: prints exception variable contents Aug 30, 2017
@kylethebaker
Copy link
Contributor Author

#3503 Adding this here since I used the wrong issue in the title initially

@jmolivas jmolivas modified the milestone: 1.0.2 Aug 31, 2017
@jmolivas jmolivas merged commit bca9949 into hechoendrupal:master Aug 31, 2017
@jmolivas
Copy link
Member

@kylethebaker Thanks for your contribution, your PR was merged. This will be included in the next release.

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