change to selective catching

This commit is contained in:
tueem 2024-11-01 17:36:12 +01:00
parent 9f87f47b1f
commit 0f337696c1
No known key found for this signature in database
GPG Key ID: 819A0F7C36B9CF07

@ -1,5 +1,6 @@
package net.tomatentum.marinara.interaction.methods;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.security.InvalidParameterException;
import java.util.ArrayList;
@ -52,8 +53,8 @@ public abstract class InteractionMethod {
}
method.setAccessible(true);
try {
method.invoke(handler, parameters);
}catch (Exception ex) {
method.invoke(handler, parameters.toArray());
}catch (IllegalAccessException | InvocationTargetException ex) {
throw new RuntimeException(ex);
}
}