Skip to content

Error handling

Ben edited this page Jan 29, 2024 · 1 revision

By default, the Server, Cient and IOHandler will not be in verbose mode. This results in occuring exceptions not being displayed in the console. Instead they're being forwarded to Listeners. Those Listeners can be created by creating an instance of ServerListener, ClientListener or IOHandlerListener and then registered via .registerListener(listener) to the respective server/client/iohandler object. You only need to override the functions for the events you want to listen on.

Verbose mode

If you activate verbose mode by calling Server.setVerbose(true) and its Client/IOHandler counterparts you can set all instances to be in verbose mode. In Verbose mode occuring exceptions will be printed to console.

Clone this wiki locally