重新绑定异常处理

This commit is contained in:
yanwenwu
2020-02-02 22:10:52 +08:00
parent 6040ee4873
commit ae37218fcd

View File

@@ -6,6 +6,7 @@ use catchAdmin\permissions\OperateLogListener;
use catchAdmin\permissions\PermissionsMiddleware;
use catchAdmin\system\event\LoginLogEvent;
use catchAdmin\system\event\OperateLogEvent;
use catcher\CatchExceptionHandle;
use catcher\CatchQuery;
use catcher\command\BackupCommand;
use catcher\command\CompressPackageCommand;
@@ -20,6 +21,7 @@ use catcher\command\SeedRunCommand;
use catcher\command\worker\WsWorkerCommand;
use catcher\event\LoadModuleRoutes;
use catcher\validates\Sometimes;
use think\exception\Handle;
use think\facade\Validate;
use think\Service;
@@ -49,6 +51,7 @@ class CatchAdminService extends Service
$this->registerMiddleWares();
$this->registerListeners();
$this->registerQuery();
$this->registerExceptionHandle();
}
/**
@@ -132,4 +135,9 @@ class CatchAdminService extends Service
'connections' => $connections
], 'database');
}
protected function registerExceptionHandle()
{
$this->app->bind(Handle::class, CatchExceptionHandle::class);
}
}