diff options
author | Eduardo Julian | 2018-02-07 00:37:35 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-02-07 00:37:35 -0400 |
commit | 844a44f87bd03fc9c65e18149c6dd2ccf8e9cb32 (patch) | |
tree | d94e855ddf39c710f2cecf52f6e43851fdfb25d5 /stdlib/source/lux/concurrency/task.lux | |
parent | 17d5280a5e05c70cdb0b2cf44606c186b000c7c1 (diff) |
- Improved the way exceptions work.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/concurrency/task.lux | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/stdlib/source/lux/concurrency/task.lux b/stdlib/source/lux/concurrency/task.lux index a740d7398..603dfc808 100644 --- a/stdlib/source/lux/concurrency/task.lux +++ b/stdlib/source/lux/concurrency/task.lux @@ -18,8 +18,9 @@ (:: P.Applicative<Promise> wrap (#E.Error error))) (def: #export (throw exception message) - (All [a] (-> Exception Text (Task a))) - (fail (exception message))) + (All [e a] (-> (Exception e) e (Task a))) + (:: P.Applicative<Promise> wrap + (ex.throw exception message))) (def: #export (return value) (All [a] (-> a (Task a))) |