createWithHandler

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

Creates a new EventBus with a custom exception handler.

Java-facing overload accepting Consumer to avoid Unit boilerplate. Kotlin callers use the EventBus { t -> ... } lambda overload instead.

Parameters

exceptionHandler

Invoked whenever a handler throws.


@JvmName(name = "createWithHandler")
fun createWithHandler(asyncExecutor: Executor?, exceptionHandler: Consumer<Throwable>): EventBus

Creates a new EventBus with both an async executor and a custom exception handler.

Java-facing overload accepting Consumer. Kotlin callers use the EventBus(executor) { t -> ... } lambda overload instead.

Parameters

asyncExecutor

Executor for async handlers; null disables async dispatch.

exceptionHandler

Invoked whenever a handler throws.