summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2019-11-03 23:12:51 +0800
committerLi Haoyi <haoyi.sg@gmail.com>2019-11-03 23:12:51 +0800
commitb8a67854660887398cd1247b0248c3ad134029be (patch)
tree50edb7a91a62ac5ecf616a123cbb49769bc51f64
parent0c58de44a581acedc624ec118c8a2feb57334ad4 (diff)
downloadcask-b8a67854660887398cd1247b0248c3ad134029be.tar.gz
cask-b8a67854660887398cd1247b0248c3ad134029be.tar.bz2
cask-b8a67854660887398cd1247b0248c3ad134029be.zip
actor readme
-rw-r--r--docs/pages/4 - Cask Actors.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/pages/4 - Cask Actors.md b/docs/pages/4 - Cask Actors.md
index ecfaedb..9c739ad 100644
--- a/docs/pages/4 - Cask Actors.md
+++ b/docs/pages/4 - Cask Actors.md
@@ -64,6 +64,14 @@ instead of many individual. `StateMachineActor` allows you to define actors via
a set of distinct states, each of which has a separate `run` callback that
transitions the actor to a different state.
+Note that any exception that is thrown while an Actor is processing a message
+(or batch of messages, in the case of `BatchActor`) is simply reported to the
+`cask.actor.Context`'s `reportFailure` function: the default just prints to the
+console using `.printStackTrace()`, but you can hook in to pass the exceptions
+elsewhere e.g. if you have a remote error aggregating service. The actor
+continues processing messages after the failure in the state that it was left
+in.
+
## Example: Asynchronous Logging using an Actor
Here is a small demonstration of using a `cask.actor.SimpleActor` to perform