eee
This commit is contained in:
@@ -77,6 +77,10 @@ class Application extends BaseApplication
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$scanner = $this->container->get(Scanner::class);
|
$scanner = $this->container->get(Scanner::class);
|
||||||
|
$scanner->setConfig(array_merge(
|
||||||
|
config('servers.reload.scan', []),
|
||||||
|
config('site.scanner', [])
|
||||||
|
));
|
||||||
$scanner->scan(APP_PATH . 'app/');
|
$scanner->scan(APP_PATH . 'app/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,23 +82,30 @@ class ErrorHandler extends Component implements ErrorInterface
|
|||||||
* @throws
|
* @throws
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public function shutdown(): void
|
public function shutdown(): void
|
||||||
{
|
{
|
||||||
$lastError = error_get_last();
|
$lastError = error_get_last();
|
||||||
if (empty($lastError) || $lastError['type'] !== E_ERROR) {
|
$fatalTypes = [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR];
|
||||||
return;
|
if (empty($lastError) || !in_array($lastError['type'], $fatalTypes, true)) {
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
$this->getLogger()->println(json_encode($lastError,JSON_UNESCAPED_UNICODE));
|
|
||||||
|
if (class_exists(\Kiri\Di\Scanner::class, false)) {
|
||||||
event(new OnSystemError());
|
$scanFile = \Kiri\Di\Scanner::getCurrentFile();
|
||||||
}
|
if ($scanFile !== null) {
|
||||||
|
$lastError['scanner_file'] = $scanFile;
|
||||||
|
}
|
||||||
/**
|
}
|
||||||
* @param Throwable $exception
|
|
||||||
*
|
$this->getLogger()->println(json_encode($lastError, JSON_UNESCAPED_UNICODE));
|
||||||
* @throws
|
|
||||||
|
event(new OnSystemError());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Throwable $exception
|
||||||
|
*
|
||||||
|
* @throws
|
||||||
*/
|
*/
|
||||||
public function exceptionHandler(Throwable $exception): void
|
public function exceptionHandler(Throwable $exception): void
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user