Last active
February 12, 2018 21:32
-
-
Save richardimaoka/dfc495b0494f0439ae1d958450cf404e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] Running example.Main | |
0 | |
0 | |
0 | |
0 | |
-1 | |
[ERROR] [02/13/2018 06:21:58.210] [exampleSystem-akka.actor.default-dispatcher-3] [akka.stream.Log(akka://exampleSystem/system/StreamSupervisor-0)] [foreachSink] Upstream failed. | |
java.lang.ArithmeticException: / by zero | |
at example.Main$.$anonfun$main$2(Main.scala:16) | |
at scala.runtime.java8.JFunction1$mcII$sp.apply(JFunction1$mcII$sp.java:12) | |
at akka.stream.impl.fusing.Map$$anon$8.onPush(Ops.scala:48) | |
at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:512) | |
at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:475) | |
at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:371) | |
at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:585) | |
at akka.stream.impl.fusing.GraphInterpreterShell.init(ActorGraphInterpreter.scala:555) | |
at akka.stream.impl.fusing.ActorGraphInterpreter.tryInit(ActorGraphInterpreter.scala:676) | |
at akka.stream.impl.fusing.ActorGraphInterpreter.preStart(ActorGraphInterpreter.scala:724) | |
at akka.actor.Actor.aroundPreStart(Actor.scala:528) | |
at akka.actor.Actor.aroundPreStart$(Actor.scala:528) | |
at akka.stream.impl.fusing.ActorGraphInterpreter.aroundPreStart(ActorGraphInterpreter.scala:667) | |
at akka.actor.ActorCell.create(ActorCell.scala:591) | |
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:462) | |
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:484) | |
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:282) | |
at akka.dispatch.Mailbox.run(Mailbox.scala:223) | |
at akka.dispatch.Mailbox.exec(Mailbox.scala:234) | |
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) | |
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) | |
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) | |
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) | |
[ERROR] [02/13/2018 06:21:58.210] [exampleSystem-akka.actor.default-dispatcher-4] [akka.stream.Log(akka://exampleSystem/system/StreamSupervisor-0)] [ignoreSink] Upstream failed. | |
java.lang.ArithmeticException: / by zero | |
at example.Main$.$anonfun$main$1(Main.scala:14) | |
at scala.runtime.java8.JFunction1$mcII$sp.apply(JFunction1$mcII$sp.java:12) | |
at akka.stream.impl.fusing.Map$$anon$8.onPush(Ops.scala:48) | |
at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:512) | |
at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:475) | |
at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:371) | |
at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:585) | |
at akka.stream.impl.fusing.GraphInterpreterShell.init(ActorGraphInterpreter.scala:555) | |
at akka.stream.impl.fusing.ActorGraphInterpreter.tryInit(ActorGraphInterpreter.scala:676) | |
at akka.stream.impl.fusing.ActorGraphInterpreter.preStart(ActorGraphInterpreter.scala:724) | |
at akka.actor.Actor.aroundPreStart(Actor.scala:528) | |
at akka.actor.Actor.aroundPreStart$(Actor.scala:528) | |
at akka.stream.impl.fusing.ActorGraphInterpreter.aroundPreStart(ActorGraphInterpreter.scala:667) | |
at akka.actor.ActorCell.create(ActorCell.scala:591) | |
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:462) | |
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:484) | |
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:282) | |
at akka.dispatch.Mailbox.run(Mailbox.scala:223) | |
at akka.dispatch.Mailbox.exec(Mailbox.scala:234) | |
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) | |
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) | |
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) | |
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example | |
import akka.actor.ActorSystem | |
import akka.stream.Attributes.LogLevels | |
import akka.stream.scaladsl.{Sink, Source} | |
import akka.stream.{ActorMaterializer, Attributes} | |
object Main { | |
def main(args: Array[String]): Unit = { | |
implicit val system = ActorSystem("exampleSystem") | |
implicit val materializer = ActorMaterializer() | |
try{ | |
//[ERROR][ignoreSink] Upstream failed. | |
// java.lang.ArithmeticException: / by zero | |
Source(-5 to 5).map(1 / _).runWith(Sink.ignore) | |
//[ERROR] [foreachSink] Upstream failed. | |
// java.lang.ArithmeticException: / by zero | |
Source(-5 to 5).map(1 / _).runWith(Sink.foreach(println)) | |
//no error logging | |
Source(-5 to 5).map(1 / _).runWith( | |
Sink.ignore | |
.withAttributes( | |
Attributes.logLevels(onFailure = LogLevels.Off) | |
) | |
) | |
Thread.sleep(1000) | |
} finally { | |
system.terminate() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment