on master help sign in
update the exceptions section
e7bc7eaHarendra Kumar
README.md+9−7
@@ -425,13 +425,15 @@ main = do
425
425
426## Exceptions
426## Exceptions
427
427
428−From a library user point of view, there is nothing much to learn or talk about
428+Exceptions can be thrown at any point using the `MonadThrow` instance. Standard
429+exception handling combinators like `bracket`, `finally`, `handle`,
430+`onException` are provided in `Streamly.Prelude` module.
431+
429−exceptions. Synchronous exceptions work just the way they are supposed to work
432+In presence of concurrency, synchronous exceptions work just the way they are
430−in any standard non-concurrent code. When concurrent streams are combined
433+supposed to work in non-concurrent code. When concurrent streams
431−together, exceptions from the constituent streams are propagated to the
434+are combined together, exceptions from the constituent streams are propagated
432−consumer stream. When an exception occurs in any of the constituent streams
435+to the consumer stream. When an exception occurs in any of the constituent
433−other concurrent streams are promptly terminated. Exceptions can be thrown
436+streams other concurrent streams are promptly terminated.
434−using the `MonadThrow` instance.
435
437
436There is no notion of explicit threads in streamly, therefore, no
438There is no notion of explicit threads in streamly, therefore, no
437asynchronous exceptions to deal with. You can just ignore the zillions of
439asynchronous exceptions to deal with. You can just ignore the zillions of