40 if ($this->displayErrorDetails) {
46 while ($throwable = $throwable->getPrevious()) {
65 $text = sprintf(
'Type: %s' .
PHP_EOL, get_class($throwable));
67 if (
$code = $throwable->getCode()) {
71 if (
$message = $throwable->getMessage()) {
75 if (
$file = $throwable->getFile()) {
79 if ($line = $throwable->getLine()) {
83 if ($trace = $throwable->getTraceAsString()) {
84 $text .= sprintf(
'Trace: %s', $trace);
writeToErrorLog($throwable)
Write to the error log if displayErrorDetails is false.
catch(Exception $e) $message
if($is_dev) echo "Review changes write something in WHATSNEW and and then commit with log PHP_EOL
Abstract Slim application error handler.
__construct($displayErrorDetails=false)
Constructor.
logError($message)
Wraps the error_log function so that this can be easily tested.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
Slim Framework (https://slimframework.com)
renderThrowableAsText($throwable)
Render error as Text.
Abstract Slim application handler.