add
This commit is contained in:
14
app/exception/MyBusinessException.php
Normal file
14
app/exception/MyBusinessException.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace app\exception;
|
||||
|
||||
use support\exception\BusinessException;
|
||||
use Webman\Http\Request;
|
||||
use Webman\Http\Response;
|
||||
|
||||
class MyBusinessException extends BusinessException
|
||||
{
|
||||
public function render(Request $request): ?Response
|
||||
{
|
||||
return new Response(200, ['Content-Type' => 'application/json'], $this->getMessage());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user