mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Add missing file and line for Unhandled exception
This commit is contained in:
parent
fc118d709e
commit
aa5c829fae
@ -159,7 +159,9 @@ class ExceptionHandler
|
|||||||
public static function handleDefaultException(\Throwable $e): void
|
public static function handleDefaultException(\Throwable $e): void
|
||||||
{
|
{
|
||||||
$class = get_class($e);
|
$class = get_class($e);
|
||||||
self::logError("✗ Unhandled exception {$class}:\n\t{$e->getMessage()}\n");
|
$file = $e->getFile();
|
||||||
|
$line = $e->getLine();
|
||||||
|
self::logError("✗ Unhandled exception {$class} on {$file} line {$line}:\n\t{$e->getMessage()}\n");
|
||||||
self::logError('Stack trace:');
|
self::logError('Stack trace:');
|
||||||
self::logError(ConsoleColor::gray($e->getTraceAsString()) . PHP_EOL, 4);
|
self::logError(ConsoleColor::gray($e->getTraceAsString()) . PHP_EOL, 4);
|
||||||
self::logError('⚠ Please report this exception to: https://github.com/crazywhalecc/static-php-cli/issues');
|
self::logError('⚠ Please report this exception to: https://github.com/crazywhalecc/static-php-cli/issues');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user