Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-13 10:15:04 +08:00
parent 249f9b1c6f
commit 9a76ee0184
+3 -3
View File
@@ -1241,14 +1241,14 @@ if (!function_exists('error_trigger_format')) {
*/ */
function error_trigger_format(\Throwable|\Error $throwable): string function error_trigger_format(\Throwable|\Error $throwable): string
{ {
$message = "\tThrowable: " . $throwable->getMessage() . "\t\n\t" . ' ' . $throwable->getFile() . " at line " . $throwable->getLine() . "\n"; $message = "Throwable: " . $throwable->getMessage() . "\n" . ' ' . $throwable->getFile() . " at line " . $throwable->getLine() . "\n";
$message .= "\t trance\n"; $message .= "trance\n";
foreach ($throwable->getTrace() as $value) { foreach ($throwable->getTrace() as $value) {
if (!isset($value['file'])) { if (!isset($value['file'])) {
continue; continue;
} }
$message .= "\t\t" . $value['file'] . " -> " . $value['line'] . "(" . (isset($value['class']) ? $value['class'] . '::' : '') . ($value['function'] ?? 'Closure') . ")\n"; $message .= $value['file'] . " -> " . $value['line'] . "(" . (isset($value['class']) ? $value['class'] . '::' : '') . ($value['function'] ?? 'Closure') . ")\n";
} }
return "\033[41;37m" . $message . "\033[0m"; return "\033[41;37m" . $message . "\033[0m";
} }