文档首页> OBS PHP SDK> API参考> 初始化> SDK自定义异常
更新时间:2021-03-18 GMT+08:00
分享

SDK自定义异常

功能说明

SDK自定义异常是由ObsClient统一抛出的异常,继承自\RuntimeException类。通常是OBS服务端错误,包含OBS错误码、错误信息等,便于用户定位问题,并做出适当的处理。

命名空间

类名

父命名空间

ObsException

Obs

方法描述

方法名

返回值类型

说明

ObsException->getExceptionCode

string

OBS服务端错误码。

ObsException->getExceptionMessage

string

OBS服务端错误描述。

ObsException->getRequestId

string

OBS服务端返回的请求ID。

ObsException->getHostId

string

请求的服务端ID。

ObsException->getResponse

GuzzleHttp\Psr7\Response

HTTP响应对象。

ObsException->getRequest

GuzzleHttp\Psr7\Request

HTTP请求对象。

ObsException->getStatusCode

integer

HTTP状态码。

分享:

    相关文档

    相关产品