Package org.apache.pekko.pattern
Class StatusReply.Error$
java.lang.Object
org.apache.pekko.pattern.StatusReply.Error$
- Enclosing class:
- StatusReply<T>
Scala API for creating and pattern matching an error response
For example:
case StatusReply.Error(exception) => ...
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StatusReply.Error$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> StatusReply<T>Scala API: Create an status response with a error message describing why the request was failed or denied.<T> StatusReply<T>Scala API: Create an error response with a user definedThrowable.scala.Option<Throwable>unapply(StatusReply<?> status)
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
Error$
public Error$()
-
-
Method Details
-
apply
Scala API: Create an status response with a error message describing why the request was failed or denied. -
apply
Scala API: Create an error response with a user definedThrowable.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 Pekko does not contain pre-build serializers for arbitrary exceptions.
-
unapply
-