@@ -7,6 +7,7 @@ import com.noxcrew.interfaces.InterfacesListeners.Companion.REOPEN_REASONS
7
7
import com.noxcrew.interfaces.element.CompletedElement
8
8
import com.noxcrew.interfaces.event.DrawPaneEvent
9
9
import com.noxcrew.interfaces.exception.InterfacesExceptionContext
10
+ import com.noxcrew.interfaces.exception.InterfacesExceptionHandler
10
11
import com.noxcrew.interfaces.exception.InterfacesExceptionResolution
11
12
import com.noxcrew.interfaces.exception.InterfacesOperation
12
13
import com.noxcrew.interfaces.grid.GridPoint
@@ -59,7 +60,7 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
59
60
/* * The interface backing this view. */
60
61
public val backing : T ,
61
62
birthParent : InterfaceView ? ,
62
- ) : InterfaceView {
63
+ ) : InterfaceView, InterfacesExceptionHandler by backing.builder.exceptionHandler {
63
64
64
65
public companion object {
65
66
/* * The amount of columns a chest inventory has. */
@@ -778,18 +779,4 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
778
779
override fun runChatQuery (timeout : Duration , onCancel : suspend () -> Unit , onComplete : suspend (Component ) -> Boolean ) {
779
780
InterfacesListeners .INSTANCE .startChatQuery(this , timeout, onCancel, onComplete)
780
781
}
781
-
782
- /* * Executes [function], reporting any errors to the [InterfacesExceptionHandler] being used. */
783
- public suspend fun <T > execute (
784
- context : InterfacesExceptionContext ,
785
- onException : suspend (Exception , InterfacesExceptionResolution ) -> Unit = { _, _ -> },
786
- function : suspend () -> T ,
787
- ): T ? = builder.exceptionHandler.execute(context.copy(view = this ), onException, function)
788
-
789
- /* * Executes [function], reporting any errors to the [InterfacesExceptionHandler] being used. */
790
- public fun <T > executeSync (
791
- context : InterfacesExceptionContext ,
792
- onException : (Exception , InterfacesExceptionResolution ) -> Unit = { _, _ -> },
793
- function : () -> T ,
794
- ): T ? = builder.exceptionHandler.executeSync(context.copy(view = this ), onException, function)
795
782
}
0 commit comments