learning-akka icon indicating copy to clipboard operation
learning-akka copied to clipboard

Chapter 2: Status.Failure usage

Open khlumzeemee opened this issue 7 years ago • 0 comments

Hi, In the chapter 2, AkkademyDb class, we have two different syntaxes for the same pattern (sending a failure message to the sender)

case None => sender() ! Status.Failure(new KeyNotFoundException(key)) and case o => Status.Failure(new ClassNotFoundException)

Why do we user sender() ! in the first example and not the second? Is there any difference? Does it matter?

khlumzeemee avatar Jul 18 '17 10:07 khlumzeemee