你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
MultiShardException Class
- java.
lang. Object - Exception
- com.
microsoft. azure. elasticdb. query. exception. MultiShardException
- com.
public class MultiShardException
DEVNOTE: Encapsulate SMM ShardLocation type for now since Shard isn't Serializable Support for serialization of ShardLocation is in the works. A MultiShardException represents an exception that occurred when performing operations against a shard. It provides information about both the identity of the shard and the exception that occurred. Depending on the nature of the exception, one can try re-running the multi-shard query, execute a separate query targeted directly at the shard(s) on that yielded the exception, or lastly execute the query manually against the shard using a common tool such as SSMS.
Constructor Summary
Constructor | Description |
---|---|
MultiShardException() |
Initializes a new instance of the MultiShardException class. |
MultiShardException(ShardLocation shardLocation) |
Initializes a new instance of the MultiShardException class with the specified shard location. |
MultiShardException(ShardLocation shardLocation, Exception inner) |
Initializes a new instance of the MultiShardException class with the specified shard location and exception. |
MultiShardException(ShardLocation shardLocation, String message) |
Initializes a new instance of the MultiShardException class with the specified shard location and error message. |
MultiShardException(ShardLocation shardLocation, String message, Exception inner) |
Initializes a new instance of the MultiShardException class with the specified shard location, error message and exception encountered. |
MultiShardException(String message) |
Initializes a new instance of the MultiShardException class with the specified error message. |
MultiShardException(String message, Exception innerException) |
Initializes a new instance of the MultiShardException class with the specified error message and the reference to the inner exception that is the cause of this exception. |
Method Summary
Modifier and Type | Method and Description |
---|---|
final Shard |
getShardLocation()
The shard associated with this exception. |
String |
toString()
Creates and returns a string representation of the current MultiShardException. |
Constructor Details
MultiShardException
public MultiShardException()
Initializes a new instance of the MultiShardException class.
MultiShardException
public MultiShardException(ShardLocation shardLocation)
Initializes a new instance of the MultiShardException class with the specified shard location.
Parameters:
MultiShardException
public MultiShardException(ShardLocation shardLocation, Exception inner)
Initializes a new instance of the MultiShardException class with the specified shard location and exception.
Parameters:
MultiShardException
public MultiShardException(ShardLocation shardLocation, String message)
Initializes a new instance of the MultiShardException class with the specified shard location and error message.
Parameters:
MultiShardException
public MultiShardException(ShardLocation shardLocation, String message, Exception inner)
Initializes a new instance of the MultiShardException class with the specified shard location, error message and exception encountered.
Parameters:
Throws:
MultiShardException
public MultiShardException(String message)
Initializes a new instance of the MultiShardException class with the specified error message.
Parameters:
MultiShardException
public MultiShardException(String message, Exception innerException)
Initializes a new instance of the MultiShardException class with the specified error message and the reference to the inner exception that is the cause of this exception.
Parameters:
Method Details
getShardLocation
public final ShardLocation getShardLocation()
The shard associated with this exception.
toString
public String toString()
Creates and returns a string representation of the current MultiShardException.
Returns: