UnhandledMessageException extends RuntimeException. See #1453
This commit is contained in:
parent
ce128740ab
commit
1979b14061
3 changed files with 3 additions and 3 deletions
|
|
@ -13,7 +13,7 @@ public class MyReceivedTimeoutUntypedActor extends UntypedActor {
|
|||
getContext().setReceiveTimeout(Duration.parse("30 seconds"));
|
||||
}
|
||||
|
||||
public void onReceive(Object message) throws Exception {
|
||||
public void onReceive(Object message) {
|
||||
if (message.equals("Hello")) {
|
||||
getSender().tell("Hello world");
|
||||
} else if (message == Actors.receiveTimeout()) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class UntypedActorSwapper {
|
|||
public static class Swapper extends UntypedActor {
|
||||
LoggingAdapter log = Logging.getLogger(getContext().system(), this);
|
||||
|
||||
public void onReceive(Object message) throws Exception {
|
||||
public void onReceive(Object message) {
|
||||
if (message == SWAP) {
|
||||
log.info("Hi");
|
||||
getContext().become(new Procedure<Object>() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue