> +            else{
> +               throw ex;
> +            }
> +        }
> +    }
> +
> +   protected Hardware resolveHardware(Set<? extends Hardware> hardwarel, 
> final Iterable<? extends Image> images) {
> +      try {
> +         return super.resolveHardware(hardwarel, images);
> +      }
> +      catch (NoSuchElementException ex) {
> +         if (super.minCores != 0 && super.minRam != 0) {
> +            return automaticHardwareForCpuAndRam(minCores, minRam);
> +         }
> +         else throw new NoSuchElementException("No hardware profile matching 
> the given criteria was found. " +
> +               "If you want to use exact values, please set the minCores and 
> minRam values");

Wrap the original exception as the cause of this one, to keep the complete 
stacktrace.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/984/files/24d1c709310ffe7e511e13c203f2d7f0d4709d37#r71835855

Reply via email to