Package br.com.caelum.vraptor.view

Examples of br.com.caelum.vraptor.view.ResultException


      HttpServletResponse originalResponse = charArrayResponse.delegate();
      entry.copyHeadersTo(originalResponse);
      logger.debug("Using cached response for {}",cached.key());
      originalResponse.getWriter().print(entry.getResult());
    } catch (IOException e) {
      throw new ResultException(e);
    }
  }
View Full Code Here


        } else {
          throw new IllegalArgumentException("This is an invalid or not supported json content");
        }
      }
    } catch (Exception e) {
      throw new ResultException("Unable to deserialize data", e);
    }

    logger.debug("json deserialized: {}", (Object) values);
    return values;
  }
View Full Code Here

  protected SerializerBuilder getSerializer() {
    try {
      return new GsonSerializer(builder, response.getWriter(), extractor);
    } catch (IOException e) {
      throw new ResultException("Unable to serialize data", e);
    }
  }
View Full Code Here

                response.getWriter().append(callbackName).append("(");
                super.serialize();
                response.getWriter().append(")");
                response.getWriter().flush();
              } catch (IOException e) {
                throw new ResultException("Unable to serialize data", e);
              }
            }
          };
        } catch (IOException e) {
          throw new ResultException("Unable to serialize data", e);
        }
      }
    };
  }
View Full Code Here

        if (Serializer.class.isAssignableFrom(type)
            || SerializerBuilder.class.isAssignableFrom(type)
            || NoRootSerialization.class.isAssignableFrom(type)) {
          return proxifier.proxify(type, returnOnFinalMethods(type));
        }
        throw new ResultException("It's not possible to create a mocked version of " + method + ". Please inform this corner case to VRaptor developers");
      }

    };
  }
View Full Code Here

    try {
      Template template = freemarker.use(path);
      includeRequestAttributes(template);
      template.render();
    } catch (IOException e) {
      throw new ResultException(e);
    } catch (TemplateException e) {
      throw new ResultException(e);
    }
  }
View Full Code Here

        if (Serializer.class.isAssignableFrom(type)
            || SerializerBuilder.class.isAssignableFrom(type)
            || NoRootSerialization.class.isAssignableFrom(type)) {
          return proxifier.proxify(type, returnOnFinalMethods(type));
        }
        throw new ResultException("It's not possible to create a mocked version of " + method + ". Please inform this corner case to VRaptor developers");
      }

    };
  }
View Full Code Here

  public void forward() {
    try {
      forward(this.method);
    } catch (ServletException e) {
      throw new ResultException(e);
    } catch (IOException e) {
      throw new ResultException(e);
    }
  }
View Full Code Here

        if (Serializer.class.isAssignableFrom(type)
            || SerializerBuilder.class.isAssignableFrom(type)
            || NoRootSerialization.class.isAssignableFrom(type)) {
          return proxifier.proxify(type, returnOnFinalMethods(type));
        }
        throw new ResultException("It's not possible to create a mocked version of " + method + ". Please inform this corner case to VRaptor developers");
      }

    };
  }
View Full Code Here

          params[i] = gson.fromJson(node, types[i]);
        }
        logger.debug("json deserialized: {}", params[i]);
      }
    } catch (Exception e) {
      throw new ResultException("Unable to deserialize data", e);
    }

    return params;
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.view.ResultException

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.