Package br.com.caelum.vraptor

Examples of br.com.caelum.vraptor.InterceptionException


                } else {
                    logger.warn("{} is an empty file", name);
                }
            }
        } catch (IOException e) {
            throw new InterceptionException(e);
        }

        for (String paramName : params.keySet()) {
            Collection<String> paramValues = params.get(paramName);
            parameters.setParameter(paramName, paramValues.toArray(new String[paramValues.size()]));
View Full Code Here


            validator.add(new ValidationMessage("upload", "file.limit.exceeded"));

            return Collections.emptyList();

        } catch (Exception e) {
            throw new InterceptionException(e);
        }
    }
View Full Code Here

                Object result = outject.invoke(resourceInstance);
                String name = helper.nameForGetter(outject);
                logger.debug("Outjecting {} as {}", name, result);
                outjecter.include(name, result);
            } catch (IllegalArgumentException e) {
                throw new InterceptionException("Unable to outject value for " + outject.getName(), e);
            } catch (IllegalAccessException e) {
                throw new InterceptionException("Unable to outject value for " + outject.getName(), e);
            } catch (InvocationTargetException e) {
                throw new InterceptionException("Unable to outject value for " + outject.getName(), e.getCause());
            }
        }
    }
View Full Code Here

        }
      }

      stack.next(method, resourceInstance);
    } catch (IOException e) {
      throw new InterceptionException(e);
    }

  }
View Full Code Here

      download.write(response);

      output.flush();
      output.close();
    } catch (IOException e) {
      throw new InterceptionException(e);
    }

  }
View Full Code Here

            }
        } catch (IllegalStateException e) {
            reportSizeLimitExceeded(e);

        } catch (IOException e) {
            throw new InterceptionException(e);

        } catch (ServletException e) {
            throw new InterceptionException(e);
        }

        for (String paramName : params.keySet()) {
            Collection<String> paramValues = params.get(paramName);
            parameters.setParameter(paramName, paramValues.toArray(new String[paramValues.size()]));
View Full Code Here

      download.write(response);

      output.flush();
      output.close();
    } catch (IOException e) {
      throw new InterceptionException(e);
    }

  }
View Full Code Here

            }
        } catch (IllegalStateException e) {
            reportSizeLimitExceeded(e);

        } catch (IOException e) {
            throw new InterceptionException(e);

        } catch (ServletException e) {
            throw new InterceptionException(e);
        }

        for (String paramName : params.keySet()) {
            Collection<String> paramValues = params.get(paramName);
            parameters.setParameter(paramName, paramValues.toArray(new String[paramValues.size()]));
View Full Code Here

            validator.onErrorUse(nothing());
          } catch (ValidationException e) {
            log.debug("Some validation errors occured: {}", e.getErrors());
          }
        }
        throw new InterceptionException(
            "There are validation errors and you forgot to specify where to go. Please add in your method "
            + "something like:\n"
            + "validator.onErrorUse(page()).of(AnyController.class).anyMethod();\n"
            + "or any view that you like.\n"
            + "If you didn't add any validation error, it is possible that a conversion error had happened.");
      }

      if (reflectionMethod.getReturnType().equals(Void.TYPE)) {
        // vraptor2 compatibility
        this.info.setResult("ok");
      } else {
        this.info.setResult(result);
      }
      stack.next(method, resourceInstance);
    } catch (IllegalArgumentException e) {
      throw new InterceptionException(e);
    } catch (IllegalAccessException e) {
      throw new InterceptionException(e);
    } catch (InvocationTargetException e) {
      Throwable cause = e.getCause();
      if (cause instanceof ValidationException) {
        // fine... already parsed
        log.trace("swallowing {}", cause);
View Full Code Here

          info.getResponse());
      if (!jerseyed) {
        delegate.intercept(stack, ignorableMethod, resourceInstance);
      }
    } catch (ServletException e) {
      throw new InterceptionException("Error while looking up jersey",e);
    } catch (IOException e) {
      throw new InterceptionException("Error while looking up jersey",e);
    }
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.InterceptionException

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.