Change error handling in ReflectionHelper.getMethod