mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-23 19:37:35 +08:00
refactor: enhance plugin mechanism for better extensibility
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Exceptions;
|
||||
|
||||
use App\Helpers\ApiResponse;
|
||||
use App\Services\Plugin\InterceptResponseException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\View\ViewException;
|
||||
@@ -68,6 +69,19 @@ class Handler extends ExceptionHandler
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the exception handling callbacks for the application.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
$this->reportable(function (Throwable $e) {
|
||||
//
|
||||
});
|
||||
|
||||
$this->renderable(function (InterceptResponseException $e) {
|
||||
return $e->getResponse();
|
||||
});
|
||||
}
|
||||
|
||||
protected function convertExceptionToArray(Throwable $e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user