Skip to content

异常类型参考 ​

本文档由脚本自动生成,请勿手动编辑

本文档按包列出 Kuiper 框架中的全部 48 个异常类型、继承层次及用途说明。

异常层次结构 ​

Web ​

text
\Exception
├── SessionNotStartException
└── ViewException
\RuntimeException
└── WebRequestException
    ├── RedirectException
    └── UnauthorizedException
\Slim\Exception\HttpBadRequestException
└── HttpCsrfTokenException
\Slim\Exception\HttpException
└── HttpRateLimitExceededException

数据库 ​

text
\Exception
└── MetaModelException
\RuntimeException
├── ConfigurationException
└── DataAccessException
    ├── NonTransientDataAccessException
    │   ├── DataIntegrityViolationException
    │   └── ExecutionFailException
    └── TransientDataAccessException

RPC ​

text
\RuntimeException
├── AuthenticationException
├── CodecNotFoundException
├── ConnectionException
│   └── TimedOutException
├── JsonRpcServerException
├── RateLimitExceededException
├── RequestException
├── ResolveAddressFailedException
├── RpcResponseException
└── UnsupportedTransportException

缓存 ​

text
\InvalidArgumentException
└── InvalidArgumentException

序列化 ​

text
\Exception
└── SerializeException
    ├── ClassNotFoundException
    ├── MalformedJsonException
    ├── NotSerializableException
    ├── TypeException
    └── UnexpectedValueException

可观测性 ​

text
\RuntimeException
└── OtelException

容错 ​

text
\Exception
├── CallNotPermittedException
├── IllegalStateTransitionException
├── MaxRetriesExceededException
└── ResultWasFailureException

反射 ​

text
\Exception
└── ReflectionException
    ├── ClassNotFoundException
    ├── FileNotFoundException
    ├── InvalidTokenException
    ├── SyntaxErrorException
    └── TokenStoppedException

Swoole ​

text
\RuntimeException
├── PoolException
│   ├── ConnectionException
│   ├── PoolClosedException
│   └── PoolTimeoutException
└── PoolInitializationException

HTTP 客户端 ​

text
\RuntimeException
└── HttpClientException

Web异常 ​

异常类父类说明
kuiper\web\exception\HttpCsrfTokenException\Slim\Exception\HttpBadRequestException
kuiper\web\exception\HttpRateLimitExceededException\Slim\Exception\HttpExceptionHTTP 速率限制超出异常.
kuiper\web\exception\RedirectExceptionWebRequestException
kuiper\web\exception\SessionNotStartException\Exception
kuiper\web\exception\UnauthorizedExceptionWebRequestException
kuiper\web\exception\ViewException\Exception
kuiper\web\exception\WebRequestException\RuntimeException

数据库异常 ​

异常类父类说明
kuiper\db\exception\ConfigurationException\RuntimeException
kuiper\db\exception\DataAccessException (abstract)\RuntimeException
kuiper\db\exception\DataIntegrityViolationExceptionNonTransientDataAccessException
kuiper\db\exception\ExecutionFailExceptionNonTransientDataAccessException
kuiper\db\exception\MetaModelException\Exception
kuiper\db\exception\NonTransientDataAccessException (abstract)DataAccessException
kuiper\db\exception\TransientDataAccessException (abstract)DataAccessException

RPC异常 ​

异常类父类说明
kuiper\rpc\exception\AuthenticationException\RuntimeExceptionRPC 认证失败异常.
kuiper\rpc\exception\CodecNotFoundException\RuntimeException
kuiper\rpc\exception\ConnectionException\RuntimeException
kuiper\rpc\exception\JsonRpcServerException\RuntimeException带有 JSON-RPC 错误码的服务端异常.
kuiper\rpc\exception\RateLimitExceededException\RuntimeExceptionRPC 速率限制异常.
kuiper\rpc\exception\RequestException\RuntimeException
kuiper\rpc\exception\ResolveAddressFailedException\RuntimeException
kuiper\rpc\exception\RpcResponseException\RuntimeExceptionException representing a JSON-RPC error response.
kuiper\rpc\exception\TimedOutExceptionConnectionException
kuiper\rpc\exception\UnsupportedTransportException\RuntimeException

缓存异常 ​

异常类父类说明
kuiper\cache\stash\InvalidArgumentException\InvalidArgumentException

序列化异常 ​

异常类父类说明
kuiper\serializer\exception\ClassNotFoundExceptionSerializeException
kuiper\serializer\exception\MalformedJsonExceptionSerializeException
kuiper\serializer\exception\NotSerializableExceptionSerializeException
kuiper\serializer\exception\SerializeException\Exception
kuiper\serializer\exception\TypeExceptionSerializeException
kuiper\serializer\exception\UnexpectedValueExceptionSerializeException

可观测性异常 ​

异常类父类说明
kuiper\otel\OtelException\RuntimeExceptionOTel 模块异常.

容错异常 ​

异常类父类说明
kuiper\resilience\circuitbreaker\exception\CallNotPermittedException\Exception熔断器拒绝调用时抛出的异常.
kuiper\resilience\circuitbreaker\exception\IllegalStateTransitionException\Exception熔断器状态非法转换时抛出的异常.
kuiper\resilience\circuitbreaker\exception\ResultWasFailureException\Exception调用正常返回,但返回结果被配置的谓词判定为失败.
kuiper\resilience\retry\exception\MaxRetriesExceededException\Exception重试次数达到上限仍未成功时抛出.

反射异常 ​

异常类父类说明
kuiper\reflection\exception\ClassNotFoundExceptionReflectionException
kuiper\reflection\exception\FileNotFoundExceptionReflectionException
kuiper\reflection\exception\InvalidTokenExceptionReflectionException
kuiper\reflection\exception\ReflectionException\Exception
kuiper\reflection\exception\SyntaxErrorExceptionReflectionException
kuiper\reflection\exception\TokenStoppedExceptionReflectionException

Swoole异常 ​

异常类父类说明
kuiper\swoole\exception\ConnectionExceptionPoolExceptionException for connection-related errors.
kuiper\swoole\exception\PoolClosedExceptionPoolExceptionException thrown when attempting to use a closed pool.
kuiper\swoole\exception\PoolException\RuntimeExceptionBase exception for pool-related errors.
kuiper\swoole\exception\PoolInitializationException\RuntimeExceptionException thrown when pool initialization fails.
kuiper\swoole\exception\PoolTimeoutExceptionPoolExceptionException thrown when connection pool timeout occurs.

HTTP 客户端异常 ​

异常类父类说明
kuiper\http\client\HttpClientException\RuntimeExceptionHTTP 客户端调用失败.

基于 MIT 许可发布