Merge pull request #17018 from danielwegener/patch-1
=doc: Simplyfies decider in FlowErrorDocSpec.scala
This commit is contained in:
commit
9ae08a57fe
1 changed files with 3 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ class FlowErrorDocSpec extends AkkaSpec {
|
||||||
|
|
||||||
"demonstrate resume stream" in {
|
"demonstrate resume stream" in {
|
||||||
//#resume
|
//#resume
|
||||||
val decider: Supervision.Decider = exc => exc match {
|
val decider: Supervision.Decider = {
|
||||||
case _: ArithmeticException => Supervision.Resume
|
case _: ArithmeticException => Supervision.Resume
|
||||||
case _ => Supervision.Stop
|
case _ => Supervision.Stop
|
||||||
}
|
}
|
||||||
|
|
@ -46,7 +46,7 @@ class FlowErrorDocSpec extends AkkaSpec {
|
||||||
"demonstrate resume section" in {
|
"demonstrate resume section" in {
|
||||||
//#resume-section
|
//#resume-section
|
||||||
implicit val mat = ActorFlowMaterializer()
|
implicit val mat = ActorFlowMaterializer()
|
||||||
val decider: Supervision.Decider = exc => exc match {
|
val decider: Supervision.Decider = {
|
||||||
case _: ArithmeticException => Supervision.Resume
|
case _: ArithmeticException => Supervision.Resume
|
||||||
case _ => Supervision.Stop
|
case _ => Supervision.Stop
|
||||||
}
|
}
|
||||||
|
|
@ -64,7 +64,7 @@ class FlowErrorDocSpec extends AkkaSpec {
|
||||||
"demonstrate restart section" in {
|
"demonstrate restart section" in {
|
||||||
//#restart-section
|
//#restart-section
|
||||||
implicit val mat = ActorFlowMaterializer()
|
implicit val mat = ActorFlowMaterializer()
|
||||||
val decider: Supervision.Decider = exc => exc match {
|
val decider: Supervision.Decider = {
|
||||||
case _: IllegalArgumentException => Supervision.Restart
|
case _: IllegalArgumentException => Supervision.Restart
|
||||||
case _ => Supervision.Stop
|
case _ => Supervision.Stop
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue