public class ClientException
extends java.lang.Exception
The client side exceptions when accessing OSS service
ClientException
means there're errors occurred when sending request to OSS or parsing the response from OSS.
For example when the network is unavailable, this exception will be thrown.
ServiceException
means there're errors occurred in OSS service side. For example, the Access Id
does not exist for authentication, then ServiceException
or its subclass is thrown.
The ServiceException has the error code for the caller to have some specific handling.
Generally speaking, the caller only needs to handle ServiceException
as it means the request
has reached OSS, but there're some errors occurred. This error in most of cases are expected due to
wrong parameters int the request or some wrong settings in user's account. The error code is very helpful
for troubleshooting.
构造器和说明 |
---|
ClientException()
Constructor
|
ClientException(java.lang.String message)
Constructor with message
|
ClientException(java.lang.String message,
java.lang.Throwable cause)
Constructor with error message and exception instance
|
ClientException(java.lang.String message,
java.lang.Throwable cause,
java.lang.Boolean isCancelled)
Constructor with error message, exception instance and isCancelled flag
|
ClientException(java.lang.Throwable cause)
Constructor with exception
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getMessage() |
java.lang.Boolean |
isCanceledException()
Checks if the exception is due to the cancellation
|
public ClientException()
public ClientException(java.lang.String message)
message
- the error messagepublic ClientException(java.lang.Throwable cause)
cause
- the exceptionpublic ClientException(java.lang.String message, java.lang.Throwable cause)
message
- Error messagecause
- The exception instancepublic ClientException(java.lang.String message, java.lang.Throwable cause, java.lang.Boolean isCancelled)