Doc: Simplyfies decider in FlowErrorDocSpec.scala
Or is there any reason to do an explicit match?
This commit is contained in:
parent
53e3dcad06
commit
c6b51ea555
1 changed files with 3 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ class FlowErrorDocSpec extends AkkaSpec {
|
|||
|
||||
"demonstrate resume stream" in {
|
||||
//#resume
|
||||
val decider: Supervision.Decider = exc => exc match {
|
||||
val decider: Supervision.Decider = {
|
||||
case _: ArithmeticException => Supervision.Resume
|
||||
case _ => Supervision.Stop
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ class FlowErrorDocSpec extends AkkaSpec {
|
|||
"demonstrate resume section" in {
|
||||
//#resume-section
|
||||
implicit val mat = ActorFlowMaterializer()
|
||||
val decider: Supervision.Decider = exc => exc match {
|
||||
val decider: Supervision.Decider = {
|
||||
case _: ArithmeticException => Supervision.Resume
|
||||
case _ => Supervision.Stop
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ class FlowErrorDocSpec extends AkkaSpec {
|
|||
"demonstrate restart section" in {
|
||||
//#restart-section
|
||||
implicit val mat = ActorFlowMaterializer()
|
||||
val decider: Supervision.Decider = exc => exc match {
|
||||
val decider: Supervision.Decider = {
|
||||
case _: IllegalArgumentException => Supervision.Restart
|
||||
case _ => Supervision.Stop
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue