24 lines
545 B
PHP
24 lines
545 B
PHP
<?php
|
|
|
|
namespace App\Exceptions;
|
|
|
|
use App\Lottery\ErrorCode;
|
|
use App\Support\ApiResponse;
|
|
use RuntimeException;
|
|
|
|
/**
|
|
* 玩家钱包划转等业务失败时抛出,由控制器捕获并转为 {@see ApiResponse} JSON。
|
|
*
|
|
* @property-read int $lotteryCode {@see ErrorCode}
|
|
*/
|
|
final class WalletOperationException extends RuntimeException
|
|
{
|
|
public function __construct(
|
|
string $message,
|
|
public readonly int $lotteryCode,
|
|
public readonly int $httpStatus = 400,
|
|
) {
|
|
parent::__construct($message);
|
|
}
|
|
}
|