Skip to content

Commit 2c27dee

Browse files
committed
update docs
1 parent 1f17bc0 commit 2c27dee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ liftEff $ trace "Hello world!"
9797

9898
This lets you write your whole program in `Aff`, and still call out to synchronous `Eff` code.
9999

100+
If your `Eff` code throws exceptions (`err :: Exception`), you can remove the exceptions using `liftEff'`
101+
to bring the exception to the value level as an `Either Error a`:
102+
103+
```purescript
104+
do e <- liftEff' myExcFunc
105+
liftEff $ either (trace "caught exception") (trace "no exception") e
106+
```
107+
100108
## Exceptions
101109

102110
The `Aff` monad has error handling baked in, so ordinarily you don't have to worry about it.

0 commit comments

Comments
 (0)