modify
This commit is contained in:
@@ -27,6 +27,7 @@ use Snowflake\Exception\NotFindClassException;
|
||||
use stdClass;
|
||||
use Swoole\Timer;
|
||||
use Wchat\WchatProviders;
|
||||
use function Co\run;
|
||||
|
||||
/**
|
||||
* Class Init
|
||||
@@ -135,6 +136,7 @@ class Application extends BaseApplication
|
||||
*/
|
||||
public function start(Input $argv): void
|
||||
{
|
||||
run(function () use ($argv) {
|
||||
try {
|
||||
/** @var Console $manager */
|
||||
$manager = Snowflake::app()->get('console');
|
||||
@@ -146,15 +148,11 @@ class Application extends BaseApplication
|
||||
}
|
||||
response()->send($manager->execCommand($class));
|
||||
} catch (\Throwable $exception) {
|
||||
var_export(current($exception->getTrace()));
|
||||
response()->send(implode("\n", [
|
||||
'Msg: ' . $exception->getMessage(),
|
||||
'Line: ' . $exception->getLine(),
|
||||
'File: ' . $exception->getFile()
|
||||
]));
|
||||
response()->send(logger()->exception($exception));
|
||||
} finally {
|
||||
Timer::clearAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user