ServiceException Class |
表示阿里云服务返回的错误消息。
ServiceException用于处理阿里云服务返回的错误消息。 比如,用于身份验证的AccessKeyID不存在,则会抛出ServiceException。 异常中包含了错误代码,用于让调用者进行特定的处理。
WebException表示的则是在向阿里云服务发送请求时出现的错误。 例如,在发送请求时网络连接不可用,则会抛出WebException的异常。
InvalidOperationException表示客户端代码无法处理或解析返回结果。这种情况 有可能是服务器返回的结果不完整,或不再符合SDK设计时的规范。如果持续遇到该错误,请考虑升级 SDK版本,或联系我们。
通常来讲,调用者只需要处理ServiceException。因为该异常表明请求被服务处理, 但处理的结果表明存在错误。异常中包含了细节的信息,特别是错误代码,可以帮助调用者进行处理。Namespace: Aliyun.OpenServices.OpenStorageService
The ServiceException type exposes the following members.
Name | Description | |
---|---|---|
![]() | ServiceException |
初始化新的ServiceException实例。
|
![]() | ServiceException(String) |
初始化新的ServiceException实例。
|
![]() | ServiceException(SerializationInfo, StreamingContext) |
初始化新的ServiceException实例。
|
![]() | ServiceException(String, Exception) |
初始化新的ServiceException实例。
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetBaseException | (Inherited from Exception.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetObjectData | (Overrides ExceptionGetObjectData(SerializationInfo, StreamingContext).) |
![]() | GetType | (Inherited from Exception.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Exception.) |
Name | Description | |
---|---|---|
![]() | Data | (Inherited from Exception.) |
![]() | ErrorCode |
获取错误代码。
|
![]() | HelpLink | (Inherited from Exception.) |
![]() | HostId |
获取Host ID。
|
![]() | HResult | (Inherited from Exception.) |
![]() | InnerException | (Inherited from Exception.) |
![]() | Message | (Inherited from Exception.) |
![]() | RequestId |
获取Request ID。
|
![]() | Source | (Inherited from Exception.) |
![]() | StackTrace | (Inherited from Exception.) |
![]() | TargetSite | (Inherited from Exception.) |
Name | Description | |
---|---|---|
![]() | SerializeObjectState | (Inherited from Exception.) |