public interface IMixinErrorHandler
| Modifier and Type | Interface and Description |
|---|---|
static class |
IMixinErrorHandler.ErrorAction
Action to take when handling an error.
|
| Modifier and Type | Method and Description |
|---|---|
IMixinErrorHandler.ErrorAction |
onApplyError(java.lang.String targetClassName,
java.lang.Throwable th,
IMixinInfo mixin,
IMixinErrorHandler.ErrorAction action)
Called when an error occurs applying a mixin.
|
IMixinErrorHandler.ErrorAction |
onPrepareError(IMixinConfig config,
java.lang.Throwable th,
IMixinInfo mixin,
IMixinErrorHandler.ErrorAction action)
Called when an error occurs whilst initialising a mixin config.
|
IMixinErrorHandler.ErrorAction onPrepareError(IMixinConfig config, java.lang.Throwable th, IMixinInfo mixin, IMixinErrorHandler.ErrorAction action)
By default, when a critical error occurs the mixin processor will
raise a warning if the config is not marked as "required" and will throw
an Error if it is. This behaviour can be altered by returning
different values from this method.
The original throwable which was caught is passed in via the
th parameter and the default action is passed in to the
action parameter. A plugin can choose to output a friendly message
but leave the original behaviour intact (by returning null
or returning action directly. Alternatively it may throw a
different exception or error, or can reduce the severity of the error by
returning a different IMixinErrorHandler.ErrorAction.
config - Config being prepared when the error occurredth - Throwable which was caughtmixin - Mixin which was being applied at the time of the erroraction - Default actionIMixinErrorHandler.ErrorAction onApplyError(java.lang.String targetClassName, java.lang.Throwable th, IMixinInfo mixin, IMixinErrorHandler.ErrorAction action)
By default, when a critical error occurs the mixin processor will
raise a warning if the config is not marked as "required" and will throw
an Error if it is. This behaviour can be altered by returning
different values from this method.
The original throwable which was caught is passed in via the
th parameter and the default action is passed in to the
action parameter. A plugin can choose to output a friendly message
but leave the original behaviour intact (by returning null
or returning action directly. Alternatively it may throw a
different exception or error, or can reduce the severity of the error by
returning a different IMixinErrorHandler.ErrorAction.
targetClassName - Class being transformed when the error occurredth - Throwable which was caughtmixin - Mixin which was being applied at the time of the erroraction - Default action