object Error
Scala API for creating and pattern matching an error response
For example:
case StatusReply.Error(exception) => ...
- Source
- StatusReply.scala
- Alphabetic
- By Inheritance
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def apply[T](exception: Throwable): StatusReply[T]
Scala API: Create an error response with a user defined Throwable.
Scala API: Create an error response with a user defined Throwable.
Prefer the string based error response over this one when possible to avoid tightly coupled logic across actors and passing internal failure details on to callers that can not do much to handle them.
For cases where types are needed to identify errors and behave differently enumerating them with a specific set of response messages may be a better alternative to encoding them as generic exceptions.
Also note that Akka does not contain pre-build serializers for arbitrary exceptions.
- def apply[T](errorMessage: String): StatusReply[T]
Scala API: Create an status response with a error message describing why the request was failed or denied.
- def unapply(status: StatusReply[_]): Option[Throwable]