chore: 捕获安装异常
This commit is contained in:
parent
78f9728ae3
commit
5ddfb0b5aa
@ -46,9 +46,15 @@ class ModuleInstall
|
||||
*/
|
||||
protected function installWithTitle(string $title): void
|
||||
{
|
||||
try {
|
||||
$installer = CatchAdmin::getModuleInstaller($title);
|
||||
|
||||
$installer->install();
|
||||
} catch (\Exception|\Throwable $e) {
|
||||
CatchAdmin::deleteModulePath($title);
|
||||
|
||||
throw new FailedException('安装失败: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user