MCCoroutineExceptionEvent

class MCCoroutineExceptionEvent(extension: <ERROR CLASS>?, exception: Throwable)

A Minestom event which is called when an exception is raised in one of the coroutines managed by MCCoroutine. Cancelling this exception causes the error to not get logged and offers to possibility for custom logging.

Constructors

MCCoroutineExceptionEvent
Link copied to clipboard
fun MCCoroutineExceptionEvent(extension: <ERROR CLASS>?, exception: Throwable)

Functions

isCancelled
Link copied to clipboard
open fun isCancelled(): Boolean

Gets if the Event should be cancelled or not.

setCancelled
Link copied to clipboard
open fun setCancelled(cancel: Boolean)

Marks the Event as cancelled or not.

Properties

exception
Link copied to clipboard
val exception: Throwable

The exception to be logged.

extension
Link copied to clipboard
val extension: <ERROR CLASS>?

Extension causing the exception. Is null if the exception is thrown from the root Minecraft Server implementation.