code: public static void throwThrowable(final Class<?> throwableType, final Object[] args, final Throwable optionalCause) throws Throwable {
          Class<?>[] argsClasses = getClassesOfObjects(args);
          Constructor<?> constructor = ReflectionHelper.getCallableConstructorForParams(throwableType, argsClasses);
          Throwable throwable = null;
          if (constructor != null) {
              throwable = (Throwable) constructor.newInstance(args);
          } else {
              throwable = (Throwable) throwableType.newInstance();
          }
          if (optionalCause != null) {
              throwable.initCause(optionalCause);
          }
          throw throwable;
  
      }
docs: Throws a throwable of type throwableType. The throwable will be created using an args
  matching constructor or the default constructor if no matching constructor can be found.
  
  @param throwableType
  type of throwable to be thrown
  @param args
  for the throwable construction
  @param optionalCause
  cause to be set, may be null
  @throws Throwable