Companion

object Companion

Functions

Link copied to clipboard
@JvmName(name = "createWithHandler")
fun createWithHandler(exceptionHandler: Consumer<Throwable>): EventBus

Java-friendly overload of createWithHandler accepting java.util.function.Consumer so Java callers avoid Unit boilerplate:

Link copied to clipboard
@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.