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