mention stateName in FSM unhandled messages, see #2617
This commit is contained in:
parent
c27389ca1b
commit
daaa5d5eaf
2 changed files with 5 additions and 0 deletions
|
|
@ -427,6 +427,8 @@ trait FSM[S, D] extends Listeners with ActorLogging {
|
|||
/**
|
||||
* Set handler which is called upon reception of unhandled messages. Calling
|
||||
* this method again will overwrite the previous contents.
|
||||
*
|
||||
* The current state may be queried using ``stateName``.
|
||||
*/
|
||||
final def whenUnhandled(stateFunction: StateFunction): Unit =
|
||||
handleEvent = stateFunction orElse handleEventDefault
|
||||
|
|
|
|||
|
|
@ -192,6 +192,9 @@ do something else in this case you can specify that with
|
|||
.. includecode:: code/docs/actor/FSMDocSpec.scala
|
||||
:include: unhandled-syntax
|
||||
|
||||
Within this handler the state of the FSM may be queried using the
|
||||
:meth:`stateName` method.
|
||||
|
||||
**IMPORTANT**: This handler is not stacked, meaning that each invocation of
|
||||
:func:`whenUnhandled` replaces the previously installed handler.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue