From 252f0c67b6c8e95f47841bae22353951fac5aed8 Mon Sep 17 00:00:00 2001 From: Masood Fallahpoor Date: Sun, 16 Aug 2020 23:08:25 +0430 Subject: [PATCH 1/3] Fix some sample outputs not being displayed in flow.md For some reason, some sample outputs in section `Flow Exceptions` are not displayed in the documentation. This commit fixes this issue. --- docs/flow.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/flow.md b/docs/flow.md index b1d6669a5d..06aa4e576e 100644 --- a/docs/flow.md +++ b/docs/flow.md @@ -1463,13 +1463,13 @@ fun main() = runBlocking { A "Caught ..." message is not printed despite there being a `catch` operator: - +``` #### Catching declaratively @@ -1510,12 +1510,12 @@ fun main() = runBlocking { Now we can see that a "Caught ..." message is printed and so we can catch all the exceptions without explicitly using a `try/catch` block: - +``` ### Flow completion From 1976d0e8a89ba240c42f9ce169a27c0243941b54 Mon Sep 17 00:00:00 2001 From: masood Date: Tue, 18 Aug 2020 10:20:50 +0430 Subject: [PATCH 2/3] Add missing directives --- docs/flow.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/flow.md b/docs/flow.md index 06aa4e576e..312169e27b 100644 --- a/docs/flow.md +++ b/docs/flow.md @@ -1471,6 +1471,8 @@ Exception in thread "main" java.lang.IllegalStateException: Collected 2 at ... ``` + + #### Catching declaratively We can combine the declarative nature of the [catch] operator with a desire to handle all the exceptions, by moving the body @@ -1517,6 +1519,8 @@ Emitting 2 Caught java.lang.IllegalStateException: Collected 2 ``` + + ### Flow completion When flow collection completes (normally or exceptionally) it may need to execute an action. From 91b52e9279a2335a780cc7ff0e7cb0a9b2a22227 Mon Sep 17 00:00:00 2001 From: masood Date: Tue, 18 Aug 2020 14:30:43 +0430 Subject: [PATCH 3/3] Update a wrong directive --- docs/flow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/flow.md b/docs/flow.md index 312169e27b..2b1dfd59a9 100644 --- a/docs/flow.md +++ b/docs/flow.md @@ -1519,7 +1519,7 @@ Emitting 2 Caught java.lang.IllegalStateException: Collected 2 ``` - + ### Flow completion