IncomingGameMessageConsumerExceptionHandler

An exception handler for exceptions caught during the invocation of game message consumers for a given session. As the server only calls one function to process all the incoming messages, any one of them could throw an exception half-way through, thus we need a handler to safely deal with exceptions if that were to happen.

Parameters

R

the receiver of the session object, typically a player.

Inheritors

Functions

Link copied to clipboard
abstract fun exceptionCaught(session: Session<R>, packet: IncomingGameMessage, cause: Throwable)

Triggered whenever an throwable is caught when invoking the incoming game message consumers for all the packets that came in.