#22147 show the cause of the error stopping durable store

This commit is contained in:
Johan "Party Cannon" Andrén 2017-01-18 09:19:49 +01:00 committed by GitHub
parent 6c8a69109a
commit 91d6a3f125
2 changed files with 2 additions and 2 deletions

View file

@ -67,7 +67,7 @@ object DurableStore {
case object LoadAll
final case class LoadData(data: Map[String, ReplicatedData])
case object LoadAllCompleted
class LoadFailed(message: String, cause: Throwable) extends RuntimeException(message) {
class LoadFailed(message: String, cause: Throwable) extends RuntimeException(message, cause) {
def this(message: String) = this(message, null)
}

View file

@ -910,7 +910,7 @@ final class Replicator(settings: ReplicatorSettings) extends Actor with ActorLog
OneForOneStrategy()(
({
case e @ (_: DurableStore.LoadFailed | _: ActorInitializationException) if fromDurableStore
log.error(e, "Stopping distributed-data Replicator due to load or startup failure in durable store")
log.error(e, "Stopping distributed-data Replicator due to load or startup failure in durable store, caused by: {}", if (e.getCause eq null) "" else e.getCause.getMessage)
context.stop(self)
SupervisorStrategy.Stop
}: SupervisorStrategy.Decider).orElse(SupervisorStrategy.defaultDecider))