first commit
This commit is contained in:
24
app/common/exception/BusinessException.php
Normal file
24
app/common/exception/BusinessException.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace app\common\exception;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
use Webman\Http\Request;
|
||||
use Webman\Http\Response;
|
||||
use Webman\Exception\ExceptionHandler;
|
||||
|
||||
class BusinessException extends Exception
|
||||
{
|
||||
protected $data;
|
||||
|
||||
public function __construct(string $message = "", int $code = 400, $data = null, Throwable $previous = null)
|
||||
{
|
||||
$this->data = $data;
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
public function getData()
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user