Closed jaidetree closed 3 weeks ago
It’s intended - Bacon has never caught exceptions. The thinking is that exceptions are treated as programming errors and should fail fast. Which is ofc opinionated.
Thanks for the insight, seems reasonable
@jaidetree Otherwise you can use Bacon.try
together with .flatMap
like this:
wrapped = source.flatMap(Bacon.try(dangerousOperation))
That's perfect thanks!
Given code like the following:
I expect the error in the map operator to make its way through the promise, then the catch handler can test the error and log my expected message.
Instead, the stream exits immediately and it seems like an error is thrown outside of the stream.
Is the idea that I should be wrapping my logic in a try...catch clause or is this an unexpected bug?