The following is an example error message from the PHP 7 runtime:
PHP Fatal error: impure error: class 'Predis \ Connection \ ConnectionException' not found in predis.php: 4168
Stack trace:
# 0 / var / www / api / libraries / predis / predis.php (4455): Predis \ Connection \ AbstractConnection-> onConnectionError ('Error so far rea ...')
Notice the ellipsis in the line trace line of the first stack, labeled # 0:
('Error during rea ...')
Where the most important information would be if it were not cut off. Other error messages have the same problem, often cutting off very valuable parts of the message.
Is there a parameter that we can use to print additional information in the stack trace? The exact version of PHP we are using is 7.1.1.
Update . The exact problem we are talking about is described in How to disable PHP by cutting off parts of long arguments in an exception stack trace? This question may be closed. The idea is to catch an exception, call Exception :: getTrace (), and create the error message manually. An exception can be detected in the global hander or in each try / catch block. By default, the Exception :: getTraceAsString implementation truncates the function's long arguments.
source
share