Change uninitialized throw of IllegalArgumentException from ClusterSharding.shardRegionProxy to IllegalStateException #28198 (#28205)
This commit is contained in:
parent
d385c1098a
commit
cf688444b1
1 changed files with 2 additions and 2 deletions
|
|
@ -626,7 +626,7 @@ class ClusterSharding(system: ExtendedActorSystem) extends Extension {
|
||||||
case null =>
|
case null =>
|
||||||
proxies.get(proxyName(typeName, None)) match {
|
proxies.get(proxyName(typeName, None)) match {
|
||||||
case null =>
|
case null =>
|
||||||
throw new IllegalArgumentException(s"Shard type [$typeName] must be started first")
|
throw new IllegalStateException(s"Shard type [$typeName] must be started first")
|
||||||
case ref => ref
|
case ref => ref
|
||||||
}
|
}
|
||||||
case ref => ref
|
case ref => ref
|
||||||
|
|
@ -643,7 +643,7 @@ class ClusterSharding(system: ExtendedActorSystem) extends Extension {
|
||||||
def shardRegionProxy(typeName: String, dataCenter: DataCenter): ActorRef = {
|
def shardRegionProxy(typeName: String, dataCenter: DataCenter): ActorRef = {
|
||||||
proxies.get(proxyName(typeName, Some(dataCenter))) match {
|
proxies.get(proxyName(typeName, Some(dataCenter))) match {
|
||||||
case null =>
|
case null =>
|
||||||
throw new IllegalArgumentException(s"Shard type [$typeName] must be started first")
|
throw new IllegalStateException(s"Shard type [$typeName] must be started first")
|
||||||
case ref => ref
|
case ref => ref
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue