-
Notifications
You must be signed in to change notification settings - Fork 106
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
Render console exceptions using standard HTML exception renderer #1246
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1246 +/- ##
==========================================
Coverage 72.83% 72.84%
+ Complexity 2557 2554 -3
==========================================
Files 130 130
Lines 6270 6267 -3
==========================================
- Hits 4567 4565 -2
+ Misses 1703 1702 -1
Continue to review full report at Codecov.
|
src/Console.php
Outdated
foreach ($lines as $line) { | ||
$this->outputHTML($line); | ||
} | ||
$this->outputHTML('<div style="white-space: normal; font-family: Lato,\'Helvetica Neue\',Arial,Helvetica,sans-serif;">{0}</div>', [$this->app->renderExceptionHTML($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.
@ibelar ok with you? do you know a better way to reset the css styles/font?
I have added "current" screenshot to the description. Looking at them side-by-side, I still kinda like the first one for the console output. Current output can be much easier copy pasted, e.g.:
|
@romaninsh argument is nonsense, as you can say exactly the same for normal HTML exception also the current HTML is quite copy-pasteable, so your argument is not only nonsense, but also demolished now:
anyway, we are in screenshots time :D :D |
@mvorisek I'm entitled to my own opinion (prefer text-based output), just like you are entitled to yours. Also - I do not understand the benefit of this change. |
@romaninsh currently, the renderers are splitted between several classes that can not be further extended, so they need currently a lot of code like: and this was the primary motivation to look into this I have edited this several times already, it is really hard to maintain and I think the overall result is also better, we should target one implementation for everything, not n partially working ones |
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.
LGTM
Reuse HTML table rendering for outputting console stack traces, technically improving code reuse.
Current behaviour:
Example after change:
Other info
no BC break from code point of view (only different UX)
App::renderExceptionHTMLText()
was introduced not that long by my in another refactoring...