MCCoroutineExceptionEvent

class MCCoroutineExceptionEvent(val extension: <Error class: unknown class>?, val 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

Link copied to clipboard
constructor(extension: <Error class: unknown class>?, exception: Throwable)

Properties

Link copied to clipboard

The exception to be logged.

Link copied to clipboard
val extension: <Error class: unknown class>?

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

Functions

Link copied to clipboard
open fun isCancelled(): Boolean

Gets if the Event should be cancelled or not.

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

Marks the Event as cancelled or not.