Hi Nikita, I like the new display format, but there's one thing I miss. If you replace the exception name for warnings and fatals, how does a user know which exception he has to catch?
Regards, Niklas Nikita Popov <nikita....@gmail.com> schrieb am Do., 09.04.2015, 10:04: > Hi internals! > > A lot of people have been confused about engine exceptions currently > displaying as normal fatal errors (if they aren't caught). We'll have to > change this to use exception messages. > > Before doing this I'd like to clean up the messages a bit to make them more > friendly for CLI usage. Currently the messages are so cluttered that it's > hard to find the actual error message if you're in an 80 char window. > > Patch is here: https://github.com/php/php-src/pull/1226 > > Previous message: > > Fatal error: Uncaught exception 'UnexpectedValueException' with message > 'Failed to open directory ""' in %s:%d > Stack trace: > #0 %s(%d): DirectoryIterator->__construct('\x00/abc') > #1 {main} > thrown in %s on line %d > > New message: > > UnexpectedValueException: Failed to open directory "" in %s on line %d > Stack trace: > #0 %s(%d): DirectoryIterator->__construct('\x00/abc') > #1 {main} > > Essentially exceptions would display like ordinary error, but with "Fatal > error" / "Warning" / ... replaced by the exception name, and showing a > stack trace after the error. > > A side-effect of the change is that uncaught exceptions will always be > displayed canonically and not based on __toString output. To modify display > of exception output, people should modify the respective properties of the > exception. > > Any objections to this? > > Thanks, > Nikita >