invoke

@JvmName(name = "create")
operator fun invoke(): EventBus

Creates a new EventBus with the default error handler (Throwable::printStackTrace).


operator fun invoke(exceptionHandler: (Throwable) -> Unit): EventBus

Creates a new EventBus with a custom error handler invoked whenever a handler throws. Kotlin callers use this overload. Java callers use the java.util.function.Consumer overload instead.

Parameters

exceptionHandler

Called on the thread that called post if a handler throws.