Examples of RenderException


Examples of com.google.template.soy.sharedpasses.render.RenderException

      String directiveName, SoyData value, List<SoyData> args, SoyNode node) {

    // Get directive.
    SoyTofuPrintDirective directive = soyTofuDirectivesMap.get(directiveName);
    if (directive == null) {
      throw new RenderException(
          "Failed to find Soy print directive with name '" + directiveName + "'" +
          " (tag " + node.toSourceString() + ")");
    }

    // TODO: Add a pass to check num args at compile time.
    if (! directive.getValidArgsSizes().contains(args.size())) {
      throw new RenderException(
          "Print directive '" + directiveName + "' used with the wrong number of" +
          " arguments (tag " + node.toSourceString() + ").");
    }

    return directive.applyForTofu(value, args);
View Full Code Here

Examples of com.google.template.soy.sharedpasses.render.RenderException

  @Override protected SoyData computeFunction(
      String fnName, List<SoyData> args, FunctionNode fnNode) {

    SoyTofuFunction fn = soyTofuFunctionsMap.get(fnName);
    if (fn == null) {
      throw new RenderException(
          "Failed to find Soy function with name '" + fnName + "'" +
          " (function call \"" + fnNode.toSourceString() + "\").");
    }

    // Arity has already been checked by CheckFunctionCallsVisitor.

    try {
      return fn.computeForTofu(args);
    } catch (Exception e) {
      throw new RenderException(
          "Error while computing function \"" + fnNode.toSourceString() + "\": " + e.getMessage());
    }
  }
View Full Code Here

Examples of com.google.template.soy.sharedpasses.render.RenderException

  @Override protected SoyData visitDataRefNode(DataRefNode node) {

    // Cannot preevaluate injected data.
    if (node.isIjDataRef()) {
      throw new RenderException("Cannot preevaluate reference to ijData.");
    }

    // Otherwise, super method can handle it.
    return super.visitDataRefNode(node);
  }
View Full Code Here

Examples of com.google.template.soy.sharedpasses.render.RenderException

  @Override protected SoyData computeFunctionHelper(
      SoyJavaRuntimeFunction fn, List<SoyData> args, FunctionNode fnNode) {

    if (! fn.getClass().isAnnotationPresent(SoyPureFunction.class)) {
      throw new RenderException("Cannot preevaluate impure function.");
    }

    return super.computeFunctionHelper(fn, args, fnNode);
  }
View Full Code Here

Examples of com.jfinal.render.RenderException

      url = url + "?" + queryString;
   
    try {
      response.sendRedirect(url)// always 302
    } catch (IOException e) {
      throw new RenderException(e);
    }
  }
View Full Code Here

Examples of com.jfinal.render.RenderException

      response.setContentType(contentType + ";charset=" + getEncoding());
      writer = response.getWriter();
          writer.write(jsonText);
          writer.flush();
    } catch (IOException e) {
      throw new RenderException(e);
    }
    finally {
      if (writer != null)
        writer.close();
    }
View Full Code Here

Examples of info.magnolia.rendering.engine.RenderException

                            + StandardFragmentAttrProcessor.ATTR_NAME);

            // and pass the fragment name and spec then onto the engine
            engine.process(fragment.getTemplateName(), context, fragment.getFragmentSpec(), out);
        }catch(IOException x) {
            throw new RenderException(x);
        }


    }
View Full Code Here

Examples of org.geomajas.rendering.RenderException

          coordHeight));
      document.registerWriter(InternalTileImpl.class, new VmlTileWriter(coordWidth, coordHeight));
      document.setMaximumFractionDigits(MAXIMUM_FRACTION_DIGITS);
      return document;
    } else {
      throw new RenderException(ExceptionCode.RENDERER_TYPE_NOT_SUPPORTED, renderer);
    }
  }
View Full Code Here

Examples of org.geomajas.rendering.RenderException

      document.registerWriter(InternalTileImpl.class, new VmlLabelTileWriter(coordWidth, coordHeight,
          getTransformer(), labelStyleInfo, geoService, textService));
      document.setMaximumFractionDigits(MAXIMUM_FRACTION_DIGITS);
      return document;
    } else {
      throw new RenderException(ExceptionCode.RENDERER_TYPE_NOT_SUPPORTED, renderer);
    }
  }
View Full Code Here

Examples of org.geomajas.rendering.RenderException

        }
        previous.setNeedsCloseTag(true);
      }
      writer.write(WebSafeStringEncoder.escapeHTML(text));
    } catch (IOException ioe) {
      throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.