All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.pragmasoft.pekko.sensors.metered.SetupNotFound.scala Maven / Gradle / Ivy

There is a newer version: 1.0.6
Show newest version
package nl.pragmasoft.pekko.sensors.metered

import scala.reflect.ClassTag
import scala.util.control.NoStackTrace

trait SetupNotFound extends NoStackTrace

object SetupNotFound {
  private final case class Impl(msg: String) extends RuntimeException(msg) with SetupNotFound
  private def errorMsg[T: ClassTag]: String = {
    val className = implicitly[ClassTag[T]].runtimeClass.getName
    s"Can't find dispatcher setup for '$className'." +
      s" Please check if you have `$className` defined for your ActorSystem." +
      s" Check ActorSystemSetup for more info."
  }
  def apply[T: ClassTag]: SetupNotFound = Impl(errorMsg[T])
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy