<?php

namespace Kylin\Guardian\Exceptions;

use Kylin\Core\Exceptions\BusinessException;
use Kylin\Guardian\Enums\GuardianErrorCode;

/**
 * 监护人异常
 *
 * 监护人系统相关的业务异常，携带 GuardianErrorCode 错误码。
 */
class GuardianException extends BusinessException
{
    public function __construct(
        public readonly GuardianErrorCode $guardianErrorCode,
        ?string $message = null,
    ) {
        parent::__construct($guardianErrorCode, $message);
    }
}
