Project: mule
Issue MULE-8854: Exceptions are wrapped in extensions API
There's a problem when throwing certain exceptions. I was invoking a non existent method in the operation of an extension, expecting the NoSuchMethodException to be wrapped by a MessagingException. The result was a MessagingException wrapping a UndeclaredThrowableException that then contained my exception. I tracked it down to the rethrowRuntimeException method in class org.springframework.util.ReflectionUtils:	public static void rethrowRuntimeException(Throwable ex) {	if (ex instanceof RuntimeException) {	throw (RuntimeException) ex;	}	if (ex instanceof Error) {	throw (Error) ex;	}	throw new UndeclaredThrowableException(ex);	} So it seems this involves all exceptions that are not RuntimeException or Error.
Story points: 1