Describe the feature
As per the Kotlin docs, Kotlin code needs to use the @Throws annotation to allow Java code to throw/catch exceptions in some cases. Adding @Throws(Mishap::class) to Action#operate, SpellAction#execute, etc would make it easier for Java addons to throw mishaps without resorting to scuffed workarounds.
Note that we apparently already did this for Operator and OperatorBasic:
|
@Throws(Mishap::class) |
|
abstract fun operate(env: CastingEnvironment, image: CastingImage, continuation: SpellContinuation): OperationResult |
Additional context
No response
Describe the feature
As per the Kotlin docs, Kotlin code needs to use the
@Throwsannotation to allow Java code to throw/catch exceptions in some cases. Adding@Throws(Mishap::class)toAction#operate,SpellAction#execute, etc would make it easier for Java addons to throw mishaps without resorting to scuffed workarounds.Note that we apparently already did this for
OperatorandOperatorBasic:HexMod/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.kt
Lines 29 to 30 in ef2cd28
Additional context
No response