pekko/akka-actor/src/main/scala/akka/AkkaException.scala

29 lines
858 B
Scala
Raw Normal View History

/**
2012-01-19 18:21:06 +01:00
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package akka
/**
* Akka base Exception. Each Exception gets:
* <ul>
* <li>a uuid for tracking purposes</li>
* <li>toString that includes exception name, message and uuid</li>
* </ul>
*/
//TODO add @SerialVersionUID(1L) when SI-4804 is fixed
class AkkaException(message: String, cause: Throwable) extends RuntimeException(message, cause) with Serializable {
def this(msg: String) = this(msg, null)
2012-05-21 11:00:45 +02:00
lazy val uuid: String = java.util.UUID.randomUUID().toString
2012-05-21 20:21:12 +02:00
override def toString(): String = uuid + super.toString()
}
/**
* This exception is thrown when Akka detects a problem with the provided configuration
*/
class ConfigurationException(message: String, cause: Throwable) extends AkkaException(message, cause) {
def this(msg: String) = this(msg, null)
}