[Akka streams] Why is there no GraphStage in akka streams that can give me a failed element along with throwable ?
16 views
Skip to first unread message
Saloni Vithalani
unread,
Apr 12, 2018, 4:49:35 AM4/12/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Akka User List
Hello,
Let's say for example we have such a stream
Source(1 to 10) .map(x ⇒ if (x % 2 == 0) throw new RuntimeException("test error")) .mapError { case NonFatal(ex) ⇒ // do something with the failed element 2 ex.printStackTrace() ex }
The question is why not mapError give me element '2' along with the 'RuntimeException' ?