Package br.com.caelum.vraptor.http

Examples of br.com.caelum.vraptor.http.InvalidParameterException


  }
  private void handleException(Target<?> target, Throwable e) {
    if (e.getClass().isAnnotationPresent(ValidationException.class)) {
      errors.add(new SimpleMessage(target.getName(), e.getLocalizedMessage()));
    } else if (e.getCause() == null) {
      throw new InvalidParameterException("Exception when trying to instantiate " + target, e);
    } else {
      handleException(target, e.getCause());
    }
  }
View Full Code Here


      request.setParameter(name, name);
      request.setAttribute(name, upload);

      logger.debug("Uploaded file: {} with {}", name, upload);
    } catch (IOException e) {
      throw new InvalidParameterException("Cant parse uploaded file " + item.getName(), e);
    }
  }
View Full Code Here

            parameters.setParameter(name, name);
            request.setAttribute(name, upload);

            logger.debug("Uploaded file: {} with {}", name, upload);
        } catch (IOException e) {
            throw new InvalidParameterException("Cant parse uploaded file " + item.getName(), e);
        }
    }
View Full Code Here

      Throwable cause = e.getCause();
      if (cause.getClass().isAnnotationPresent(ValidationException.class)) {
        throw new ConversionError(cause.getLocalizedMessage());
      } else {
        throw new InvalidParameterException("unable to parse expression '" + key + "'", e);
      }

    } catch (NoSuchPropertyException ex) {
      // TODO optimization: be able to ignore or not
      logger.debug("cant find property for expression {} ignoring", key);
View Full Code Here

  }
  private void handleException(Target<?> target, Throwable e) {
    if (e.getClass().isAnnotationPresent(ValidationException.class)) {
      errors.add(new ValidationMessage(e.getLocalizedMessage(), target.getName()));
    } else if (e.getCause() == null) {
      throw new InvalidParameterException("Exception when trying to instantiate " + target, e);
    } else {
      handleException(target, e.getCause());
    }
  }
View Full Code Here

    }

    try {
      return ognl.nullHandler().instantiate(param.actualType());
    } catch (Exception ex) {
      throw new InvalidParameterException("unable to instantiate type " + param.type, ex);
    }
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.http.InvalidParameterException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.