Hi,
A while ago I proposed a patch that improved html_errors, but i got no
response from that, so i repost an improved version...
The patch changes they way errors are displayed:
- They are readable.
The current version prints in black with no background at all,
sometimes leading to black error messages on dark backgrounds - not
very readable. Additionally, they have a fixed font size so they
don't appear in a 4px font somewhere. - They are colorized.
Notices, warnings, fatal errors and other errors get distinct colors
for a better quick overview. - They look better ;)
It uses CSS to format the error message nicely.
The colors used are changeable by php.ini directives.
Since many people just debug in their browser without using own
error_handlers or append/prepend_strings, i think this is a nice
addition that makes php more user-friendly.
An example of how this looks can be found at:
http://prp0.prp.physik.tu-darmstadt.de/~swalk/errors.htm
Regards
Stefan
Why don't you just use the existing ini options:
; String to output before an error message.
;error_prepend_string = "<font color=ff0000>"
; String to output after an error message.
;error_append_string = "</font>"
??
--Jani
Hi,
A while ago I proposed a patch that improved html_errors, but i got no
response from that, so i repost an improved version...The patch changes they way errors are displayed:
- They are readable.
The current version prints in black with no background at all,
sometimes leading to black error messages on dark backgrounds - not
very readable. Additionally, they have a fixed font size so they
don't appear in a 4px font somewhere.- They are colorized.
Notices, warnings, fatal errors and other errors get distinct colors
for a better quick overview.- They look better ;)
It uses CSS to format the error message nicely.The colors used are changeable by php.ini directives.
Since many people just debug in their browser without using own
error_handlers or append/prepend_strings, i think this is a nice
addition that makes php more user-friendly.An example of how this looks can be found at:
http://prp0.prp.physik.tu-darmstadt.de/~swalk/errors.htmRegards
Stefan
--
https://www.paypal.com/xclick/business=sniper@php.net&no_note=1&tax=0¤cy_code=EUR
Nevermind, I should learn to read..you wanted to have different
colors for different messages..
--Jani
Why don't you just use the existing ini options:
; String to output before an error message.
;error_prepend_string = "<font color=ff0000>"; String to output after an error message.
;error_append_string = "</font>"??
--Jani
Hi,
A while ago I proposed a patch that improved html_errors, but i got no
response from that, so i repost an improved version...The patch changes they way errors are displayed:
- They are readable.
The current version prints in black with no background at all,
sometimes leading to black error messages on dark backgrounds - not
very readable. Additionally, they have a fixed font size so they
don't appear in a 4px font somewhere.- They are colorized.
Notices, warnings, fatal errors and other errors get distinct colors
for a better quick overview.- They look better ;)
It uses CSS to format the error message nicely.The colors used are changeable by php.ini directives.
Since many people just debug in their browser without using own
error_handlers or append/prepend_strings, i think this is a nice
addition that makes php more user-friendly.An example of how this looks can be found at:
http://prp0.prp.physik.tu-darmstadt.de/~swalk/errors.htmRegards
Stefan
--
https://www.paypal.com/xclick/business=sniper@php.net&no_note=1&tax=0¤cy_code=EUR
Why don't you just use the existing ini options: ; String to output before an error message. ;error_prepend_string = "<font color=ff0000>" ; String to output after an error message. ;error_append_string = "</font>" ?? --Jani
This patch is not for me, I don't debug in my browser. While helping
others writing PHP, the conversation "What error message?"
"There is none, look for yourself, http://..." was not rare, because the
error message was hidden somewhere.
Changing the default to display it in a well-formatted way would be
helpful for beginners, in my - and most people i asked about this -
opinion.
When changing append/prepend strings, they get outputted also when
html_errors is off, so putting html in them is not a good thing imo.
(Also, distinct colors are not possible by doing that).
Regards,
Stefan Walk