Acknowledged
CIQQA-3158

Method.invoke() does not propagate exceptions

Exceptions thrown by functions invoked via Method.invoke() are not propagated to the caller. Instead, they result in an "Unhandled Exception" error that crashes the application.

This behavior is undocumented and significantly reduces the usefulness of Method.invoke(). Rather than simply calling a function dynamically, developers are forced to write wrapper functions that catch exceptions and manually relay error information back to the caller.

Ideally, Method.invoke() should propagate exceptions from the target function - perhaps by wrapping them in a container object, similar to Java’s InvocationTargetException.

At the very least, the documentation should clearly state that functions called via Method.invoke() must handle their own exceptions to avoid crashing the application.